Kawai Wiki

Compare Revisions

Ignore whitespace Rev 141 → Rev 142

/trunk/src/main/java/org/kawai/AppManager.java
131,14 → 131,23
@Override
public void loadLocales() {
List<String[]> languages = props.getArrays("languages");
for(int i = 0; i < languages.size(); i++) {
String[] array = languages.get(i);
if (!props.has("languages")) {
Language l = new Language(i + 1, array[0], array[1], array.length >= 3 ? array[2] : null);
Language l = new Language(1, "English", "en");
Language.add(l);
addLocale(l.getLocale());
} else {
List<String[]> languages = props.getArrays("languages");
for(int i = 0; i < languages.size(); i++) {
String[] array = languages.get(i);
Language l = new Language(i + 1, array[0], array[1], array.length >= 3 ? array[2] : null);
Language.add(l);
addLocale(l.getLocale());
}
}
LocaleManager.stopLocaleScan();
/trunk/src/main/java/org/kawai/tag/ListFlags.java
24,6 → 24,8
</mtw:isLocale>
*/
if (Language.all().size() == 1) return "";
LocaleManager.decideLocale(req, res); // force the locale to be chosen from param or cookie...
Locale selectedLocale = LocaleManager.getLocale(req, false);