Package ai.nexconn.chatui.utils.language
Class RongConfigurationManager
-
- All Implemented Interfaces:
public class RongConfigurationManagerConfiguration manager for locale and file size settings.
-
-
Method Summary
Modifier and Type Method Description static RongConfigurationManagergetInstance()static voidinit(Context context)voidsetFileMaxSize(Context context, int size)Sets the maximum file size for sending files. intgetFileMaxSize(Context context)Gets the maximum file size for sending files. voidswitchLocale(RCLocale locale, Context context)Switches the app language. ContextgetConfigurationContext(Context newBase)Creates a ConfigurationContext for use in attachBaseContext. RCLocalegetAppLocale(Context context)Gets the in-app locale setting. LocalegetSystemLocale()Gets the system locale. RCLocalegetLanguageLocal(Context context)Gets the current app language setting. -
-
Method Detail
-
getInstance
static RongConfigurationManager getInstance()
-
init
static void init(Context context)
-
setFileMaxSize
void setFileMaxSize(Context context, int size)
Sets the maximum file size for sending files.
- Parameters:
context- contextsize- maximum file size in MB
-
getFileMaxSize
int getFileMaxSize(Context context)
Gets the maximum file size for sending files.
- Parameters:
context- context- Returns:
maximum file size in MB
-
switchLocale
void switchLocale(RCLocale locale, Context context)
Switches the app language.
- Parameters:
locale- accepted values: RCLocale.LOCALE_CHINA, RCLocale.LOCALE_US, or RCLocale.
-
getConfigurationContext
Context getConfigurationContext(Context newBase)
Creates a ConfigurationContext for use in attachBaseContext.
- Parameters:
newBase- the base context- Returns:
the configuration-wrapped context
-
getAppLocale
RCLocale getAppLocale(Context context)
Gets the in-app locale setting.
- Returns:
the in-app locale
-
getSystemLocale
Locale getSystemLocale()
Gets the system locale.
- Returns:
the system locale
-
getLanguageLocal
RCLocale getLanguageLocal(Context context)
Gets the current app language setting.
- Returns:
the resolved locale
-
-
-
-