Methods
sub(langKey, args, join) → {string|Array}
Utility function for substituting variables into language keys.
Examples:
sub(Liferay.Language.get('search-x'), ['all'])
=> 'search all'
sub(Liferay.Language.get('search-x'), [all], false)
=> 'search all'
Parameters:
Name | Type | Description |
---|---|---|
langKey |
string | This is the language key used from our properties file |
args |
string | Arguments to pass into language key |
join |
string | Boolean used to indicate whether to call `.join()` on the array before it is returned. Use `false` if subbing in JSX. |
Returns:
- Type
- string | Array