update:更新i18N
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user