com.pspdfkit.listeners.LocalizationListener |
![]() |
Listener that allows SDK UI strings to be localized programmatically. Localization callbacks will be called on the main thread every time a string is needed so the callbacks MUST be fast and responsive.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract String |
getLocalizedQuantityString(Context context, int stringId, Locale currentLocale, View view, int quantity, Object... formatArgs)
Called when a quantity (pluralizable) string needs to be localized and has to return a
localized string.
| ||||||||||
abstract String |
getLocalizedString(Context context, int stringId, Locale currentLocale, View view, Object... formatArgs)
Called when a string needs to be localized and has to return a localized string.
| ||||||||||
abstract String |
getLocalizedString(Context context, int stringId, Locale currentLocale, View view)
Called when a string needs to be localized and has to return a localized string.
|
Called when a quantity (pluralizable) string needs to be localized and has to return a localized string. Default implementation calls through to android.content.res.Resources#getQuantityString(int, int, Object...).
context | Context. |
---|---|
stringId | Resource id of the string requested. See strings.xml file of PSPDFKit
for all possible strings. |
currentLocale | Locale for which the string is requested for. |
view | View that requested the string if applicable. May be null . |
quantity | Quantity to be used to choose a proper pluralizable string. |
formatArgs | Formatting arguments that should be applied to the localized string. |
Called when a string needs to be localized and has to return a localized string. Default implementation calls through to android.content.res.Resources#getString(int, Object...).
context | Context. |
---|---|
stringId | Resource id of the string requested. See strings.xml file of PSPDFKit
for all possible strings. |
currentLocale | Locale for which the string is requested for. |
view | View that requested the string if applicable. May be null . |
formatArgs | Formatting arguments that should be applied to the localized string. |
Called when a string needs to be localized and has to return a localized string. Default
implementation calls through to getString(int)
.
context | Context. |
---|---|
stringId | Resource id of the string requested. See strings.xml file of PSPDFKit
for all possible strings. |
currentLocale | Locale for which the string is requested for. |
view | View that requested the string if applicable. May be null . |