mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
let LocalHelpActivity detect language-region combinations
This commit is contained in:
@@ -20,8 +20,11 @@ public class LocalHelpActivity extends WebViewActivity
|
||||
try {
|
||||
Locale locale = dynamicLanguage.getCurrentLocale();
|
||||
String appLang = locale.getLanguage();
|
||||
String appCountry = locale.getCountry();
|
||||
if (assetExists(helpPath.replace("LANG", appLang))) {
|
||||
helpLang = appLang;
|
||||
} else if (assetExists(helpPath.replace("LANG", appLang+"_"+appCountry))) {
|
||||
helpLang = appLang+"_"+appCountry;
|
||||
} else {
|
||||
appLang = appLang.substring(0, 2);
|
||||
if (assetExists(helpPath.replace("LANG", appLang))) {
|
||||
|
||||
@@ -247,7 +247,7 @@ public class LogViewFragment extends Fragment {
|
||||
Prefs.reliableService(context)).append("\n");
|
||||
|
||||
Locale locale = fragment.dynamicLanguage.getCurrentLocale();
|
||||
builder.append("lang=").append(locale.getLanguage()).append("\n");
|
||||
builder.append("lang=").append(locale.toString()).append("\n");
|
||||
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
boolean isRtl = DynamicLanguage.getLayoutDirection(context) == View.LAYOUT_DIRECTION_RTL;
|
||||
builder.append("rtl=").append(isRtl).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user