GetTranslationDefaultMayNotBeEnglish ( string key, string defaultCurrent ) : string |
We want the translation of the specified key in the current UI language. The normal LocalizationManager call expects to be passed an English default, which it will return if the language is English or if it has no translation for the string in the target language. The current default passed as an argument typically comes from the content of the element whose data-i18n attribute is the key in this method. However, this string may come from an earlier loclization and therefore NOT be English. If we pass it as the english default, we will get it back unchanged if the UI language has changed (back) to English. We will also get something other than English as a default for any langauge in which we don't have the localization. |
|