Interface DynamicLocale
public interface DynamicLocale
An interface to implement the dynamic locale throughout the app.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant value for the Hindi locale.static final String
Constant value for the Indonesian locale.static final String
Constant value for the Portuguese locale.static final String
Constant value for the Russian locale.static final String
Constant value for the Spanish locale.static final String
Dynamic locale splitter to separate language, country, etc.static final String
Constant value for the system locale.static final String
Constant value for the Turkish locale. -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultLocale
(Context context) Returns the default locale to be used if no dynamic locale support is provided.float
Returns the font scale to be applied.Returns the locale to be applied.String[]
Returns an array of supported locales.Apply the locale according to the configuration.
-
Field Details
-
SYSTEM
Constant value for the system locale.- See Also:
-
SPANISH
Constant value for the Spanish locale.- See Also:
-
HINDI
Constant value for the Hindi locale.- See Also:
-
INDONESIA
Constant value for the Indonesian locale.- See Also:
-
RUSSIAN
Constant value for the Russian locale.- See Also:
-
PORTUGUESE
Constant value for the Portuguese locale.- See Also:
-
TURKISH
Constant value for the Turkish locale.- See Also:
-
SPLIT
Dynamic locale splitter to separate language, country, etc.- See Also:
-
-
Method Details
-
getSupportedLocales
Returns an array of supported locales.- Returns:
- The array of supported locales.
- See Also:
-
getDefaultLocale
Returns the default locale to be used if no dynamic locale support is provided.- Parameters:
context
- The context to get configuration.- Returns:
- The default locale to be used if no dynamic locale support is provided.
- See Also:
-
getLocale
Returns the locale to be applied.- Returns:
- The locale to be applied.
- See Also:
-
setLocale
Apply the locale according to the configuration.- Parameters:
context
- The context to set the locale.- Returns:
- The modified context after applying the locale.
-
getFontScale
float getFontScale()Returns the font scale to be applied.- Returns:
- The font scale to be applied.
-