IRPCLanguagesAdmin.GetTranslations
Administration API / specialized admin session idempotent
Gets the translatable names of the vault's metadata structure, with their texts in a source and a target language.
| Service | Language administration MFiles.IRPCLanguagesAdmin |
|---|---|
| gRPC method | /MFiles.IRPCLanguagesAdmin/GetTranslations |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-translations |
| Request | GetTranslationsRequest |
| Response | GetTranslationsResponse |
| Book and level | Administration API, specialized |
| Kind | admin |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | yes |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
- Requires the vault rights
change_metadata_structure,license_allows_modificationsandsee_all_objects. - Returns one Translation per name that exists in the default
language, including the items of translatable value lists.
ididentifies the name, for examplePropertyDef_20_0_Name; send it back unchanged in ApplyTranslations. - If neither
include_source_languagenorinclude_target_languageis true, the list is empty. untranslated_onlyfilters on the target language's state, so it returns nothing unlessinclude_target_languageis true.
Request: GetTranslationsRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
include_source_language | bool | True to fill source_string and source_version. |
source_language | int32 | The language of source_string, usually 0 (the default language). Used only with include_source_language. |
include_target_language | bool | True to fill target_string and state. |
target_language | int32 | The language being translated to. Used only with include_target_language. |
untranslated_only | bool | True to return only names whose target text is not translated yet. Requires include_target_language. |
Response: GetTranslationsResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
values[] | repeated Translation | The translatable names. See Translation. |
values[].id | string | Identifier. |
values[].source_string | string | The source string, or unset or an empty string. |
values[].source_version | int32 | The version of the source string, or zero. |
values[].target_string | string | The target string, or unset or an empty string. |
values[].state | TranslationState | The state of the target string, or etsNotTranslated.Values: TRANSLATION_STATE_NOT_TRANSLATED (0), TRANSLATION_STATE_TRANSLATED (1). |
Related methods
- ApplyTranslations -- Stores translated names in a target language.