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 void
addObjetMap(String s)
Add a translated line on the actual map.static void
Add auto translation for every languages.static void
Print 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 void
Add untranslated key to the actual Map.static boolean
Check that every language file exists and create is if it's need.static boolean
estLigneDeTrad(String s)
Check that the line is a translation line.static boolean
static int
Return defaultLanguage if it is aviable or -1.static String
getLanguage(int x)
get the int that corresponds to the language String.static int
getLanguage(String s)
get the String that corresponds to the language int.static String
getLanguageAsString(int x)
static String
getMap()
static int
getPourcentageTraduit(int langue)
Count the %age translated.static int
getPourcentageTraduitAutomatiquement(int langue)
Count the %age translated automatically.static String
getRep()
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 void
iniMap()
static boolean
Loard language file "langue.csv".static void
setRep()
static void
static void
setTLangue(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.
-