v0.3.4: initial (very basic) language button implementation
This commit is contained in:
committed by
Evan Debenham
parent
35a6a6bee0
commit
301a3468f5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user