update:更新i18N

This commit is contained in:
2022-08-31 16:12:42 +08:00
parent 3da9a26392
commit 4e466a7868
10 changed files with 45 additions and 24 deletions

View File

@@ -4,6 +4,8 @@ import android.content.res.Resources;
import com.yunbao.common.CommonAppContext;
import java.util.Locale;
/**
* Created by cxf on 2017/10/10.
* 获取string.xml中的字
@@ -20,4 +22,10 @@ public class WordUtil {
public static String getString(int res) {
return sResources.getString(res);
}
public static boolean isZh() {
Locale locale = sResources.getConfiguration().locale;
String language = locale.getLanguage();
return language.endsWith("zh");
}
}