Use this event to
Excerpt |
---|
Customize default values for Device Language Codes to be used when entering setup at the Mobile Language the suggested "Device Language Code" on the "Mobile languages" setup page. |
Description
When setting up Mobile Languages in the web client, default "Device Language Code"'s is automatically suggested for a number of language codes.
Also, three selected mobile language (including their associated MobMessages; translations) are created during install in MOB5.27 and newer (in older versions, these will need to be setup manually):
...
up Mobile Language (7/10), the system automatically suggests Device Language Codes. E.g. Adding DEA (Austrian) will set Mobile Language Code to "DE" (German).
Using this event, you may implement new default values for other languages ie. if you created a new custom device language pack for your languagechanges to this behavior or add support for new languages, you yourself have translated.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Language", 'OnConvertLanguageCodeToDeviceLanguageCode', '', true, true)]
local procedure OnConvertLanguageCodeToDeviceLanguageCode(_LanguageCode: Code[10]; var _DeviceLanguageCode: Code[20]; var _IsHandled: Boolean)
begin
end;
Example
// [Example] : Suggest device language code 'EN' for Malaysian, and a new custom device language 'FR' for any french language
...
- Use device language code 'EN' for Malaysian
- Add a custom device language code 'TH' for Thai
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Language", 'OnConvertLanguageCodeToDeviceLanguageCode', '', true, true)]
local procedure MyOnConvertLanguageCodeToDeviceLanguageCode(_LanguageCode: Code[10]; var _DeviceLanguageCode: Code[20]; var _IsHandled: Boolean)
begin
// Malaysian
if _LanguageCode = 'MSL' then begin
_DeviceLanguageCode := 'EN'; // Use english language packUse English language pack from standard mobile wms
_IsHandled := true;
end;
// Any french language Thai
if CopyStr(_LanguageCode, 1, 2) _LanguageCode = 'FRTHA' then begin
_DeviceLanguageCode := 'FRTH'; // Use some french a device language pack (that is not in standard mobile wms, could be developed by a partner), but is created by partner
_IsHandled := true;
end;
end end;
See also:
Filter by label (Content by label) | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Version History
Version | Changes |
---|---|
MOB5.2627 | Introduced |