Globalisation
moz4r opened this issue · 6 comments
We want python script minimal as possible, and things that are not daily usual can be hard coded.
Today inmoov language pack is parsed from python land, goal is to push inside java land.
The question is what is the best way.
Language pack is used exemple to talk about startup action, or robot critical errors.
( and of course for chatbot, but this part need to stay in python land )
https://github.com/MyRobotLab/inmoov/tree/master/InMoov/system/languagePack
Table of Language Culture Names, Codes, and ISO Values Method : https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx
I recommend using the 2 letter ISO-639-1 codes... I don't trust microsoft for "standards" :)
ahaha you right... But we need to deal with things like this, other standards source ?
https://github.com/MyRobotLab/myrobotlab/blob/master/src/resource/WebGui/service/js/WebkitSpeechRecognitionGui.js
( goal is to use same logic inside every services, useful to filter things )
ohhh discovering Locale class :) seem powerful
seem we need only 1 thing now, it is loadLanguagePack() . Like loagGestures()
For documentation
Runtime runtime = Runtime.getInstance(); Locale locale = runtime.getLocale();
The locale is defaulted to the host's locale unless explicitly set differently.
This Locale is standard JVM's which gives access to ISO country codes and language details.