# Translator

This component implements the translation callbacks and methods. It has a useful `get_string` method for getting a string from the `strings` [configuration](/developer-docs/framework/configurations.md). For example, you can get the "Listings" word this way:

```php
hivepress()->translator->get_string( 'listings' );
```

You can also get the current language and region codes with the `get_language` and `get_region` methods.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivepress.io/developer-docs/framework/components/translator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
