public class LangUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LangUtils.RCLocale
可选择的语言的包装类
|
Constructor and Description |
---|
LangUtils() |
Modifier and Type | Method and Description |
---|---|
static LangUtils.RCLocale |
getAppLocale(android.content.Context context) |
static android.content.Context |
getConfigurationContext(android.content.Context context) |
static LangUtils.RCLocale |
getCurrentLanguage(android.content.Context context)
获取当前语言,不管有没有设置或跟随系统
|
static RongIMClient.PushLanguage |
getPushLanguage(android.content.Context context) |
static java.util.Locale |
getSystemLocale()
获取系统语言
|
static void |
saveLocale(android.content.Context context,
LangUtils.RCLocale locale) |
static void |
setPushLanguage(android.content.Context context,
RongIMClient.PushLanguage pushLanguage) |
static void |
setSystemLocale(java.util.Locale locale)
设置系统语言
|
public static android.content.Context getConfigurationContext(android.content.Context context)
public static LangUtils.RCLocale getAppLocale(android.content.Context context)
public static void saveLocale(android.content.Context context, LangUtils.RCLocale locale)
public static RongIMClient.PushLanguage getPushLanguage(android.content.Context context)
public static void setPushLanguage(android.content.Context context, RongIMClient.PushLanguage pushLanguage)
public static java.util.Locale getSystemLocale()
public static void setSystemLocale(java.util.Locale locale)
locale
- 设置的系统语音public static LangUtils.RCLocale getCurrentLanguage(android.content.Context context)
context
- 上下文