900-GET-PHRASE-XLT

900-GET-PHRASE-XLT 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 900-GET-LOCALE-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 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

CRT-PHRASE-XLT A 50 Phrase translation buffer that will be populated with the translated phrase by the routine.
CRT-PUT-DOTS 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
CRT-PHRASE-XLT 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 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 returns a phrase translation (from HR105).

          PERFORM 840-FIND-PADSET1.
          MOVE PAD-ITEM-NAME          TO CRT-PHRASE.
          MOVE WS-PHRASE-SIZE         TO CRT-PHRASE-SIZE.
          MOVE "N"                    TO CRT-PUT-DOTS.
          PERFORM 900-GET-PHRASE-XLT.
          MOVE CRT-PHRASE-XLT         TO SR-ITEM-NAME.