The ExtendScript translator part of the Dutranslator Framework
see https://github.com/Rainbox-dev/Dutranslator
see https://github.com/Rainbox-dev/Dutranslator
Namespaces
Members
-
static,readonlyDuTranslator.currentstring
-
The current language id (fr, en, ..)
-
static,readonlyDuTranslator.currentNamestring
-
The current language name
Methods
-
staticDuTranslator.generateTranslationFile(translations, file, appName, version, languageId, languageName, mergeScriptuiStrings)
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2309 -
Creates a file for translation with the given base strings.
Name Type Default Description translations
Array.<DuTranslation> | DuList.<string> | Array.<string> DuTranslator.originalStrings optional The translations or source strings to be included in the translation file. file
File | string The file or URI appName
string DuESF.scriptName optional A name for the app using this translation file. version
string DuESF.scriptVersion.fullVersion optional A version (as a string) for this translation file or app. languageId
string DuTranslator.current optional A version (as a string) for this translation file or app. languageName
string DuTranslator.currentName optional A version (as a string) for this translation file or app. mergeScriptuiStrings
Boolean true optional Merges the strings declared in DuScriptui to the translations. -
staticDuTranslator.generateTranslations(strings, mergeScriptuiStrings){Array.<string>}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2345 -
Converts an Array of strings to an Array of empty translations
Name Type Default Description strings
Array.<string> | DuList.<string> The base strings to convert. mergeScriptuiStrings
Boolean true optional Merges the strings declared in DuScriptui to the translations. Returns:
Type Description Array.<string> The translations -
staticDuTranslator.getAvailable(){int}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2114 -
Load the list of available languages.
If the language id and or the language name can't be found in the file, the file name will be used
to determine the language id and the name will be set as the id.
Returns:
Type Description int A success code
0 Success
1 One of the file haven't been correctly opened -
staticDuTranslator.getLanguageId(prettyName){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2195 -
Returns the language id of a given language name
Name Type Description prettyName
string The pretty name of the request language Returns:
Type Description string -
staticDuTranslator.getPrettyName(langId){string}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2184 -
Returns the pretty name of a given language
Name Type Description langId
string The id of the request language Returns:
Type Description string -
staticDuTranslator.getPrettyNames(langId){Array.<string>}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2209 -
Returns a list containing pretty names of all languages
Name Type Description langId
string The id of the request language Returns:
Type Description Array.<string> -
staticDuTranslator.setLanguage(languageId){Boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2227 -
Set the current language
Name Type Description languageId
string The id of the language to set Returns:
Type Description Boolean Success -
staticDuTranslator.setPrettyLanguage(languageName){Boolean}
D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2290 -
Set the current language with a given pretty name
Name Type Description languageName
string The pretty name of the language to set Returns:
Type Description Boolean Success