mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Added enforced language capability for custom App
This commit is contained in:
parent
9f1174d209
commit
ac79042caa
@ -49,7 +49,9 @@ DEFAULT_JSDATA = {
|
||||
'email': "kelson@kiwix.org",
|
||||
|
||||
# help page content
|
||||
'support_email': "kelson@kiwix.org"
|
||||
'support_email': "kelson@kiwix.org",
|
||||
|
||||
'enforced_lang': None
|
||||
}
|
||||
|
||||
SIZE_MATRIX = {
|
||||
|
@ -1113,6 +1113,15 @@ public class KiwixMobileActivity extends AppCompatActivity
|
||||
Log.d(TAG_KIWIX,
|
||||
"Kiwix Custom App starting for the first time. Check Companion ZIM.");
|
||||
|
||||
if (Constants.CUSTOM_APP_ENFORCED_LANG.length() > 0) {
|
||||
// Custom App recommends to start off a specific language
|
||||
LanguageUtils.handleLocaleChange(this, Constants.CUSTOM_APP_ENFORCED_LANG);
|
||||
|
||||
this.setResult(1236);
|
||||
this.finish();
|
||||
this.startActivity(new Intent(this, this.getClass()));
|
||||
}
|
||||
|
||||
//Context context = this.getApplicationContext();
|
||||
String fileName = FileUtils.getExpansionAPKFileName(true);
|
||||
Log.d(TAG_KIWIX, "Looking for: " + fileName + " -- filesize: "
|
||||
|
@ -19,4 +19,6 @@ public class Constants {
|
||||
public static final String CUSTOM_APP_EMAIL = "~support_email~";
|
||||
|
||||
public static final String CUSTOM_APP_SUPPORT_EMAIL = "~support_email~";
|
||||
|
||||
public static final String CUSTOM_APP_ENFORCED_LANG = "";
|
||||
}
|
||||
|
@ -10,4 +10,5 @@ public class Constants {
|
||||
public static final String CUSTOM_APP_WEBSITE = "~website~";
|
||||
public static final String CUSTOM_APP_EMAIL = "~support_email~";
|
||||
public static final String CUSTOM_APP_SUPPORT_EMAIL = "~support_email~";
|
||||
public static final String CUSTOM_APP_ENFORCED_LANG = "~enforced_lang~";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user