Package fr.formiko.usuel
Class trad
java.lang.Object
fr.formiko.usuel.trad
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canDisplayLanguage(int id, Font font)
True if all char can be draw in a language map.static boolean
canDisplayLanguage(int id, String fontName)
True if all char can be draw in a language map.static void
copieTradBase(String se, Map<String,String> map)
static void
countCharUsedInTranslation(int id)
Count how many time every char is used in a language map.countCharUsedInTranslation(Map<String,String> translationMap)
Count how many time every char is used in a language map.static String
debutDeLigne(String s)
static String
ligneTradBase(String s, Map<String,String> map)
static double
partOfPrintableChar(int id, Font font, boolean charWeigth)
Count how many char can be draw in a language map.static double
partOfPrintableChar(int id, String fontName, boolean charWeigth)
Count how many char can be draw in a language map.static String
Translate a String by replacing €{key} by the translation of key.static void
translateWebSiteFiles(String pathToWebSiteFile)
Translate all web site file for curent language.
-
Field Details
-
sep
-
-
Constructor Details
-
trad
public trad()
-
-
Method Details
-
copieTrads
public static void copieTrads() -
copieTradBase
-
ligneTradBase
-
debutDeLigne
-
translateWebSiteFiles
Translate all web site file for curent language.
It need to have the good path to web site file. -
replaceTranslation
Translate a String by replacing €{key} by the translation of key.- Parameters:
s
- the String to translate
-
countCharUsedInTranslation
public static Map<Character,Integer> countCharUsedInTranslation(Map<String,String> translationMap)Count how many time every char is used in a language map.- Parameters:
translationMap
- the Map to use to count char
-
countCharUsedInTranslation
Count how many time every char is used in a language map.- Parameters:
id
- id of the language to count char
-
partOfPrintableChar
Count how many char can be draw in a language map.- Parameters:
id
- id of the language to count charfont
- font to test language printabilitycharWeigth
- more used char will have a higer weigth in the result
-
partOfPrintableChar
Count how many char can be draw in a language map.- Parameters:
id
- id of the language to count charfontName
- name of the font to test language printabilitycharWeigth
- more used char will have a higer weigth in the result
-
canDisplayLanguage
True if all char can be draw in a language map.- Parameters:
id
- id of the language to count charfont
- font to test language printability
-
canDisplayLanguage
True if all char can be draw in a language map.- Parameters:
id
- id of the language to count charfontName
- name of the font to test language printability
-