| java.lang.Object Language.Language
Language | public class Language (Code) | | used to translate whole sentences appearing in the GUI.
no intelligence here. The whole sentences must all be translated
by a human beeing like you.
All argument sentences are english sentences. They are normally
available as french or german translations.
Spaces at beginning and at end of phrases are ignored in the translations,
they are generated at runtime.
example Translate(" Hello ") will translate "Hello" to "Bonjour" and
return " Bonjour ".
MAIN USAGE:
+ simply call Language.Translate("Welcome in Schmortopf") for every strings
+ there is a version with arguments.
for a single argument, the string must contain a single %.
for two arguments, the string must contain %1 and %2.
|
GetActualTranslation | public String GetActualTranslation()(Code) | | |
GetActualTranslationWasReadFromJarFile | public boolean GetActualTranslationWasReadFromJarFile()(Code) | | |
GetAvailableInternalLanguages | public String[] GetAvailableInternalLanguages()(Code) | | return a list of the languages that are present in the jar file
usually {French, German}
|
GetAvailableLanguages | public String[] GetAvailableLanguages()(Code) | | |
GetInstance | public static Language GetInstance()(Code) | | get the single instance of this class
|
SetDefaultLanguage | public static void SetDefaultLanguage(String language)(Code) | | |
Translate | public static String Translate(String sentence)(Code) | | the sentence in the actual language. Parameters: sentence - is directly search in the english databaseand translatedTHIS IS THE BASIC TRANSLATION METHODif not found, return the original string, but adda request for later translation |
Translate | public static String Translate(String _sentenceWithArgument, String arg)(Code) | | Parameters: sentenceWithArgument - the arg is a % somewhere in text that is replacedby the arg (typical example: a fileName) |
Translate | public static String Translate(String _sentenceWithArgument, String arg1, String arg2)(Code) | | Parameters: sentenceWithArgument - the args are %1 and %2 somewhere in text that is replacedby the arg (typical example: a fileName) |
getDictionaryFromFile | public SentenceDictionary getDictionaryFromFile(String language, boolean useEmbeddedInNotFound)(Code) | | the ref of the actual dic of read it if it is not already loadedCAUTION: for english: return null becacuse english has no translation on english... |
setActualTranslation | public void setActualTranslation(String language, boolean fromJarFile)(Code) | | set the language used from now to translate sentences
and load the appropriate dictionary
Parameters: fromJarFile - read it from jar file if true |
|
|