Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Simplification

Use this event to

Excerpt

Customize default values for the suggested "Device Language Codes used at the Mobile Language Code" on the "Mobile languages" setup page.

Description

...

  • Overwrite Mobile WMS Messages that already exists in Mobile Messages table
  • Overwrite labels used in the Android App Mobile Configuration File (used as "@{LabelName}"). Adding a new message "LabelName" (without '@' or '{}') will overrule similar labels from Android App resource files.

Requirements

"Mobile Language Code" must be present on the "Mobile User"
Your new eventsubscriber is executed when:
... you manually select the action "Create Messages" from "Mobile Language" page (after subscribing)
... a mobile user logs into the database and no "Mobile Messages" exists (usually only the first time a mobile user logs on)
... the Mobile WMS Application (BC App) is upgraded to a newer versionIf you want to ensure your new messages is always added to an existing Mobile Wms installation, consider (also) adding the messages from your own Install-/Upgrade-codeunits in your customization app project insteadWhen setting 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 changes to this behavior or add support for new languages, you yourself have translated.


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"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::CodeunitCodeunit::"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, 12 _LanguageCode 'FRTHA' then begin
            _DeviceLanguageCode := 'FRTH';    //  Use some french language pack (not in standard mobile wms, could be developed by a partner)Use a device language pack that is not in standard, but is created by partner
            _IsHandled := true;
        end;
    end    end;


Image Added


See also:

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
excerptTypesimple
cqllabel = "bc" and label = "onconvertlanguagecodetodevicelanguagecode" and label = "example"

 

Version History

VersionChanges
MOB5.
26
27Introduced