getLocalizedString

abstract fun getLocalizedString(@NonNull context: Context, @StringRes stringId: Int, @NonNull currentLocale: Locale, @Nullable view: View): String

Called when a string needs to be localized and has to return a localized string. Default implementation calls through to getString.

Return

Localized string to be displayed.

Parameters

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.


abstract fun getLocalizedString(@NonNull context: Context, @StringRes stringId: Int, @NonNull currentLocale: Locale, @Nullable view: View, formatArgs: Array<Any>): String

Called when a string needs to be localized and has to return a localized string. Default implementation calls through to getString.

Return

Localized string to be displayed.

Parameters

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.