# Companion

object Companion
Content copied to clipboard

## Properties

OPTION_PHONE_LANGUAGE
Link copied to clipboard
private const val OPTION_PHONE_LANGUAGE: String
Content copied to clipboard
supportedLocales
Link copied to clipboard
private val supportedLocales: List<String>
Content copied to clipboard

## Functions

applyLocalizedContext
Link copied to clipboard
fun applyLocalizedContext(baseContext: Context, prefLocaleCode: String)
Content copied to clipboard

Set localized context.

getLocaleFromConfiguration
Link copied to clipboard
private fun getLocaleFromConfiguration(configuration: Configuration): Locale
Content copied to clipboard

Get locale from application configuration.

getLocaleFromPrefCode
Link copied to clipboard
private fun getLocaleFromPrefCode(prefCode: String): Locale
Content copied to clipboard

Returns the locale to use depending on the preference value when preference value = "sys_def" returns the locale of current system else it returns the locale code e.g. "en", "bn" etc.

getLocalizedConfiguration
Link copied to clipboard
private fun getLocalizedConfiguration(locale: Locale): Configuration
Content copied to clipboard
fun getLocalizedConfiguration(prefLocaleCode: String): Configuration
Content copied to clipboard

Get actual localized configuration.

getLocalizedContext
Link copied to clipboard
fun getLocalizedContext(baseContext: Context, prefLocaleCode: String): Context
Content copied to clipboard

Get actual localized context.