Package org.exoplatform.crowdin.model
Class CrowdinTranslation
java.lang.Object
org.exoplatform.crowdin.model.CrowdinFile
org.exoplatform.crowdin.model.CrowdinTranslation
-
Nested Class Summary
Nested classes/interfaces inherited from class org.exoplatform.crowdin.model.CrowdinFile
CrowdinFile.Type -
Constructor Summary
ConstructorsConstructorDescriptionCrowdinTranslation(File _file, String _name, String _type, String _project, String _lang, CrowdinFile _master, boolean _shouldBeCleaned) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeAndroidLocale(String locale) tranform xx-XX to xx-rXXstatic StringencodeIOSLocale(String locale) transform en-GB to en_GBstatic StringencodeLanguageName(String lang, boolean isEncode) static StringReturn the right language code for Crowdin from the language code used by eXo This is useful for some specific case, for example the indonesian language code in Crowdin is "id" whereas it is "in" in the platform (and Java).getLang()Methods inherited from class org.exoplatform.crowdin.model.CrowdinFile
getCrowdinPath, getFile, getName, getProject, getType, isShouldBeCleaned
-
Constructor Details
-
CrowdinTranslation
-
-
Method Details
-
getLang
-
getMaster
-
encodeLanguageName
- Parameters:
lang- language nameisEncode- encode _ character in language name if isEncode is true, decode _ character in language name if isEncode is false- Returns:
- encoded or decoded language name
-
getCrowdinLangFromPlatformLang
Return the right language code for Crowdin from the language code used by eXo This is useful for some specific case, for example the indonesian language code in Crowdin is "id" whereas it is "in" in the platform (and Java).- Parameters:
lang- Language code in platform- Returns:
- Language code in Crowdin
-
encodeAndroidLocale
tranform xx-XX to xx-rXX- Parameters:
locale-- Returns:
-
encodeIOSLocale
transform en-GB to en_GB- Parameters:
locale-- Returns:
-