|
EasyTalk API
|
Provides a collection of translations of text for various languages. More...
Public Member Functions | |
| Translation | GetTranslation (string line, string targetLanguageCode) |
| Returns the translation for the specified line of text and ISO-639 language code, if it exists. | |
| int | GetTextDefinitionId (string text) |
| Returns the ID of the translation entry (in the original/default writing language) which matches the specified text. | |
| TranslationSet | GetOrCreateOriginalTranslationSet () |
| Retrieves or creates a translation set for the default/original language of the library. | |
| bool | HasTranslationSet (string languageCode) |
| Returns true if the library contains a TranslationSet for the ISO-639 language code provided. | |
| TranslationSet | AddSecondaryTranslationSet (string languageCode) |
| Add a TranslationSet for the ISO-639 language code specified if it doesn't exist in the library. | |
| TranslationSet | FindTranslationSetForLanguage (string languageCode) |
| Finds and returns the TranslationSet for the specified ISO-639 language code. | |
| List< Translation > | GetUntranslatedLines (string languageCode) |
| Returns a List of untranslated Translations (lines) for the specified ISO-639 language code. Any empty entries in the found TranslationSet are assumed to be untranslated. | |
| void | SetOriginalLanguage (string languageCode) |
| Changes the original language of the library to the specified ISO-639 language code and adds a TranslationSet for it if one doesn't exist for that language. | |
| Translation | AddOrFindTranslation (string text, bool copySourceTextToAll=false) |
| Adds a new translation entry based on the text provided for each language in the translation library. | |
Public Attributes | |
| string | originalLanguage = "en" |
| The original/default language for the translation library. | |
| List< TranslationSet > | translationSets = new List<TranslationSet>() |
| A list of TranslationSets, each containing translations for a specific language. | |
Provides a collection of translations of text for various languages.
| Translation EasyTalk.Localization.TranslationLibrary.AddOrFindTranslation | ( | string | text, |
| bool | copySourceTextToAll = false ) |
Adds a new translation entry based on the text provided for each language in the translation library.
| text | The text to use when adding a translation entry for the source/default language. |
| copySourceTextToAll | When set to true, all alternate languages will have their translation entry set to the provided text value. By default, this flag is false, and new entries for alternate languages will be left blank. |
| TranslationSet EasyTalk.Localization.TranslationLibrary.AddSecondaryTranslationSet | ( | string | languageCode | ) |
Add a TranslationSet for the ISO-639 language code specified if it doesn't exist in the library.
| languageCode | The ISO-639 language code to add a TranslationSet for. |
| TranslationSet EasyTalk.Localization.TranslationLibrary.FindTranslationSetForLanguage | ( | string | languageCode | ) |
Finds and returns the TranslationSet for the specified ISO-639 language code.
| languageCode | The ISO-639 language code to find a TranslationSet for. |
| TranslationSet EasyTalk.Localization.TranslationLibrary.GetOrCreateOriginalTranslationSet | ( | ) |
Retrieves or creates a translation set for the default/original language of the library.
| int EasyTalk.Localization.TranslationLibrary.GetTextDefinitionId | ( | string | text | ) |
Returns the ID of the translation entry (in the original/default writing language) which matches the specified text.
| text | The text to match (in the source language). |
| Translation EasyTalk.Localization.TranslationLibrary.GetTranslation | ( | string | line, |
| string | targetLanguageCode ) |
Returns the translation for the specified line of text and ISO-639 language code, if it exists.
| line | The line to translate. |
| targetLanguageCode | The ISO-639 language code to translate to. |
| List< Translation > EasyTalk.Localization.TranslationLibrary.GetUntranslatedLines | ( | string | languageCode | ) |
Returns a List of untranslated Translations (lines) for the specified ISO-639 language code. Any empty entries in the found TranslationSet are assumed to be untranslated.
| languageCode | The ISO-639 language code of the TranslationSet to get untranslated lines for. |
| bool EasyTalk.Localization.TranslationLibrary.HasTranslationSet | ( | string | languageCode | ) |
Returns true if the library contains a TranslationSet for the ISO-639 language code provided.
| languageCode | The ISO-639 language code to check for a translation set. |
| void EasyTalk.Localization.TranslationLibrary.SetOriginalLanguage | ( | string | languageCode | ) |
Changes the original language of the library to the specified ISO-639 language code and adds a TranslationSet for it if one doesn't exist for that language.
| languageCode | The ISO-639 language code to change to. |
| string EasyTalk.Localization.TranslationLibrary.originalLanguage = "en" |
The original/default language for the translation library.
| List<TranslationSet> EasyTalk.Localization.TranslationLibrary.translationSets = new List<TranslationSet>() |
A list of TranslationSets, each containing translations for a specific language.