The toLocaleLowerCase task is used to convert a string value to lowercase according to locale-specific case mappings. The locale is based on the language settings of the browser. For most languages this task will function exactly like the toLowerCase task and produce the same output; however, certain languages may behave differently (e.g., case mappings for Turkish do not follow the default case mappings in Unicode).
Potential Use Case
Suppose you have a dataset in uppercase format and you want to display it in lowercase. You could use the toLocaleLowerCase task to convert the entire dataset to lowercase characters.
Input and output parameters are shown below.
||String||Required. The string to convert to lowercase.|
||String||The locale to be used to convert to lowercase according to any locale-specific case mappings.|
||String||A new string representing the incoming string converted to lowercase according to the current locale.|
In this example the
str is given the Reference variable of "HELLO WORLD" in all CAPS (uppercase letters). The
locale would only be populated if it was a language such as Turkish, which needs specific letters to be capitalized for meaning.
The expected end result will be that all of the letters from the Reference variable are now lowercase and show up as "hello world".
For more information on using the locales parameter, see the Intl page on the MDN site.