As an example of the logon module in the SMP SDK Kapsel API, this module defaults to the English language pack.
In the execution
Cordova-d Platform Add Android
Cordova-d Plugin Add C:\SAP\MobileSDK3\KapselSDK\plugins\logon
After the command, there are two more language resource files in the project:
Plugins\com.sap.mp.cordova.plugins.logon\www\common\assets\i18n\i18n.properties
Platforms\android\assets\www\smp\logon\i18n\i18n.properties
For the sake of laziness, I copied i18n.propertie directly and modified the file name to I18n_zh.properties
Platforms\android\assets\www\smp\logon\i18n\i18n_zh.properties
Modify I18n_zh.properties, such as
Fld_user_label= User Name
Note Keep the file UTF-8 encoded.
Just rerun the project app in the Eclipse Android development environment and be aware that the Android emulator language is also set to ZH_CN.
-------------------------------------------------------------------------------------
In the I18n.js code snippet of the logon module
JQuery.sap.require ("jquery.sap.resources");
var locale = Sap.ui.getCore (). GetConfiguration (). GetLanguage ();
var i18n = jQuery.sap.resources ({' URL ': '). /i18n/i18n.properties ", ' locale ': locale});
getlocalizedstring = function (key) {
return I18n.gettext (key);
}
Called the JQuery.sap.resources method
This method is an API in SAP UI5
-------------------------------------------------------------------------------------
Reference: Using JQuery.i18n.properties to achieve the internationalization of the Web front end