Package fr.formiko.usuel
Class chargerLesTraductions
java.lang.Object
fr.formiko.usuel.chargerLesTraductions
Loard translation file class.
- Author:
- Hydrolien
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddObjetMap(String s)Add a translated line on the actual map.static voidAdd auto translation for every languages.static voidPrint getPourcentageTraduitAutomatiquement and getPourcentageTraduit data for every languages.Load translation for nation name.chargerLesTraductions(int langue)Load translation for a given language.chargerLesTraductionsSansCommande(int langue)Load translation for a given language.static voidAdd untranslated key to the actual Map.static booleanCheck that every language file exists and create is if it's need.static booleanestLigneDeTrad(String s)Check that the line is a translation line.static booleanstatic intReturn defaultLanguage if it is aviable or -1.static StringgetLanguage(int x)get the int that corresponds to the language String.static intgetLanguage(String s)get the String that corresponds to the language int.static StringgetLanguageAsString(int x)static StringgetMap()static intgetPourcentageTraduit(int langue)Count the %age translated.static intgetPourcentageTraduitAutomatiquement(int langue)Count the %age translated automatically.static StringgetRep()static String[]get an array of command.static String[]Load translation for nation name.static String[]getTableauDesTrad(int langue)get an array of translation for a given language.static String[]static voidiniMap()static booleanLoard language file "langue.csv".static voidsetRep()static voidstatic voidsetTLangue(String[] t)
-
Field Details
-
map
-
rep
-
tLangue
-
defaultLanguage
private static int defaultLanguage
-
-
Constructor Details
-
chargerLesTraductions
public chargerLesTraductions()
-
-
Method Details
-
getTLangue
-
setTLangue
-
getRep
-
setRep
-
setRep
public static void setRep() -
getMap
-
iniMap
public static void iniMap() -
getLanguage
get the int that corresponds to the language String.- Parameters:
x- language id.- Returns:
- language String in ISO code 639-1 if tLangue is correct.
-
getLanguage
get the String that corresponds to the language int.
An error will return 2, the id of "en" (english) (except if tLangue isn't correctly loard (return -1;))- Parameters:
s- language String in ISO code 639-1.
-
getLanguageAsString
-
getLanguageAsString
-
getDefautlLanguage
public static int getDefautlLanguage()Return defaultLanguage if it is aviable or -1. -
iniTLangue
public static boolean iniTLangue()Loard language file "langue.csv".
If it fail only "en" will be aviable. -
créerLesFichiers
public static boolean créerLesFichiers()Check that every language file exists and create is if it's need. -
estLigneDeTrad
Check that the line is a translation line.- Parameters:
s- line to check
-
getTableauDesTrad
get an array of translation for a given language.- Parameters:
langue- id if the language
-
getTableauDesNationsName
Load translation for nation name. -
getTableauDesCmd
get an array of command. -
chargerLesTraductions
Load translation for a given language.
It included command.- Parameters:
langue- id if the language
-
chargerLesTraductionsSansCommande
Load translation for a given language.
It don't included command.- Parameters:
langue- id if the language
-
chargerLesNationsName
Load translation for nation name. -
addObjetMap
Add a translated line on the actual map.- Parameters:
s- Translated line.
-
addTradAuto
public static void addTradAuto()Add auto translation for every languages.
Please refert to ThTrad to have more informations -
getPourcentageTraduit
public static int getPourcentageTraduit(int langue)Count the %age translated.
It don't included command (that are not translate).- Parameters:
langue- id if the language
-
getPourcentageTraduitAutomatiquement
public static int getPourcentageTraduitAutomatiquement(int langue)Count the %age translated automatically.
It don't included command (that are not translate).- Parameters:
langue- id if the language
-
affPourcentageTraduit
public static void affPourcentageTraduit()Print getPourcentageTraduitAutomatiquement and getPourcentageTraduit data for every languages. -
fini
-
completMapWithFullTranslatedLanguage
public static void completMapWithFullTranslatedLanguage()Add untranslated key to the actual Map.
For all key in english map, if key isn't in g.getMap() we add it.
-