U@GETPHRASEXL

U@GETPHRASEXL finds the translation for a specified phrase and returns it to the caller. If the user has only one base language defined, the routine returns the input phrase as the result.

The routine retrieves a phrase by using the locale set in the user's profile. To retrieve phrases by using a specified locale, use the routine U@GETLOCPHRXL.

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 which phrase will be retrieved if it is available. If the user passes in a size greater than the PHRASE define (50 characters), then the PHRASE define will be used in its place.

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

E@PHRASEXLT A 50 Phrase translation buffer that will be populated with the translated phrase by the routine.
E@PUTDOTS A 1

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

N = Does not add leader dots.

The default is Y.

Returned Value

Field Type and length Definition
E@PHRASEXLT A 50 The translated phrase. If the routine cannot find the default 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 returns a phrase translation (from HR105).

     CALLP     DN@DBHRPAD1(E@DBFINDEQ)
     EVAL      E@PHRASE       = DPADITMNM            
     EVAL      E@PHRASESIZE   = PWS@PHRSSZ              
     EVAL      E@PUTDOTS      = 'N'               
     CALLP     U@GETPHRASEXL               Get Phrase Xlt
     EVAL      WSR@ITMNM      = E@PHRASEXLT