i18n/$L

Provides functions to map to translated strings.

Usage:

import $L, {toIString} from '@enact/i18n/$L';
$L('Close');        // => "Close" in the current locale
toIString('Close'); // => an ilib IString representing "Close" in the current locale
import i18n/$L from '@enact/i18n/$L';

Members

$LFunction

$L(str)String

Maps a string or key/value object to a translated string for the current locale.

1 Param
str StringObject

Source string

Returns
String

The translated string

toIStringFunction

toIString(str)ilib.IString

Maps a string or key/value object to a translated string for the current locale.

1 Param
str StringObject

Source string

Returns
ilib.IString

The translated string

ArrayBooleanFunctionModuleNumberObjectString