i18n/$L

Exports the i18n/$L.$L function and i18n/$L.toIString function to map to translated strings.

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