Add android install screenshot
This commit is contained in:
parent
50e7a4931e
commit
5971c0b478
|
@ -44,14 +44,16 @@ public class RNI18nModule extends ReactContextBaseJavaModule {
|
||||||
private WritableArray getLocaleList() {
|
private WritableArray getLocaleList() {
|
||||||
WritableArray array = Arguments.createArray();
|
WritableArray array = Arguments.createArray();
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
LocaleList locales = getReactApplicationContext().getResources().getConfiguration().getLocales();
|
LocaleList locales = getReactApplicationContext()
|
||||||
|
.getResources().getConfiguration().getLocales();
|
||||||
|
|
||||||
for (int i = 0; i < locales.size(); i++) {
|
for (int i = 0; i < locales.size(); i++) {
|
||||||
array.pushString(this.toLanguageTag(locales.get(i)));
|
array.pushString(this.toLanguageTag(locales.get(i)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
array.pushString(this.toLanguageTag(getReactApplicationContext().getResources().getConfiguration().locale));
|
array.pushString(this.toLanguageTag(getReactApplicationContext()
|
||||||
|
.getResources().getConfiguration().locale));
|
||||||
}
|
}
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
|
@ -61,7 +63,6 @@ public class RNI18nModule extends ReactContextBaseJavaModule {
|
||||||
public Map<String, Object> getConstants() {
|
public Map<String, Object> getConstants() {
|
||||||
HashMap<String, Object> constants = new HashMap<String,Object>();
|
HashMap<String, Object> constants = new HashMap<String,Object>();
|
||||||
constants.put("languages", this.getLocaleList());
|
constants.put("languages", this.getLocaleList());
|
||||||
|
|
||||||
return constants;
|
return constants;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 274 KiB |
Loading…
Reference in New Issue