Localization on .NET MAUI
Face 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 our localized strings, you can override them using specialized callbacks. This will remap any string found in the native API.
RFSFaceSDK.Service.LocalizationHandler = key => {
if (key == "livenessGuide.head")
return (NSString)"My first custom string";
if (key == "livenessGuide.button")
return (NSString)"My second custom string";
return null;
};
class CallbackImpl : Java.Lang.Object, ILocalizationCallbacks {
public string OnLocalize(string key) {
if (key == "livenessGuide.head")
return "My first custom string";
if (key == "livenessGuide.button")
return "My second custom string";
return null;
}
}
FaceSDK.Instance().SetLocalizationCallback(new CallbackImpl());