900-GET-LOCALE-PHRASE-XLT

900-GET-LOCALE-PHRASE-XLT allows a developer to retrieve a translated phrase by using a specified locale. To retrieve phrases by using the locale set in the user's profile, use 900-GET-COL-PHRASE-XLT .

Library DATABASE

Required Fields

Field Type and length Definition
CRT-PHRASE A 50 English phrase used to retrieve the translated phrase.
CRT-PHRASE-SIZE N 4

Size used to determine whether the short or long phrase will be retrieved. You cannot get back anything larger than the existing phrase, but you can truncate what you get back by passing a smaller value than the existing phrase.

For more information on defining short and long phrases, see the Lawson Administration: Translation guide.

CRT-PUT-DOTS A 1

Y = Adds leader dots to any trailing space after the translated phrase.

N = Does not add leader dots.

When changed to N, it remains at N until the value is reset to Y.

CRT-LOCALE A 10 Locale used to retrieve the translated phrase.

Return Value

Field Type and length Definition
CRT-PHRASE-XLT A 50

The translated phrase.

If the routine cannot find the locale, the locale's language, or the translated phrase, then the English phrase is passed back in the CRT-PHRASE-XLT field instead of a translated phrase. The API never returns an error; it either retrieves the translation, or passes back the English phrase.

Programming Example

This example translates a phrase to target language.

        MOVE DMLODWS-LOCALE-RECORD (I7)
                                   TO CRT-LOCALE     
        MOVE DMLODWS-ALIAS-NAME    TO CRT-PHRASE
        MOVE 50                    TO CRT-PHRASE-SIZE
        MOVE "N"                   TO CRT-PUT-DOTS
        PERFORM 900-GET-LOCALE-PHRASE-XLT
        MOVE DMLODWS-MEMBER-HANDLE
                                    TO WSESB-MEMBER-HANDLE
        MOVE DMLODWS-ALIAS-RECORD (I7)
                                    TO WSESB-ALIAS-TABLE-NAME
        MOVE CRT-PHRASE-XLT    TO WSESB-ALIAS-NAME