Localization on .NET MAUI
Document Reader SDK supports localization using standard iOS and Android System Settings. However, if a language required by your application is not supported by the SDK, or you want to change default localized strings, you can override them using specialized callbacks. This will remap any string value found in the native API.
See the examples.
RGLDocReader.Shared.LocalizationHandler = key => {
if (key == "strStatus")
return (NSString)"Custom status message";
if (key == "strLookingDocument")
return (NSString)"Custom looking for document message";
return null;
};
class CallbackImpl : Java.Lang.Object, ILocalizationCallbacks {
public string OnLocalize(string key) {
if (key == "strStatus")
return "Custom status message";
if (key == "strLookingDocument")
return "Custom looking for document message";
return null;
}
}
DocumentReader.Instance().SetLocalizationCallback(new CallbackImpl());