U@GETLOCPHRXL

U@GETLOCPHRXL 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 U@GETCOLPHRXL.

Module DATABASE

Required Fields

Field Type and length Definition
E@PHRASE A 50 English phrase used to retrieve the translated phrase.
E@PHRASESIZE 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.

E@PUTDOTS 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.

E@LOCALE A 10 Locale used to retrieve the translated phrase.

Return Value

Field Type and length Definition
E@PHRASEXLT 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 E@PHRASEXLT 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.

    EVAL      E@PHRASE       = phrase-to-translate
    EVAL      E@PHRASESIZE   = length-of-phrase
    EVAL      E@LOCALE       = specified-locale
    EVAL      E@PUTDOTS      = 'N'
    CALLP     U@GETLOCPHRXL