v0.3.4: initial (very basic) language button implementation

This commit is contained in:
Evan Debenham
2016-01-14 21:23:59 -05:00
committed by Evan Debenham
parent 35a6a6bee0
commit 301a3468f5
3 changed files with 111 additions and 3 deletions
@@ -55,12 +55,12 @@ public class Messages {
private static HashMap<String, String> strings;
static{
setup();
setup(Locale.getDefault().getLanguage());
}
public static void setup(){
public static void setup( String region ){
strings = new HashMap<>();
Locale locale = Locale.getDefault(); //TODO:load in locale from a preference, use default only if none set.
Locale locale = new Locale(region); //TODO:load in locale from a preference, use default only if none set.
for (String file : prop_files) {
ResourceBundle bundle = ResourceBundle.getBundle( file, locale);