toLocaleLowerCase
  • 23 May 2023
  • Dark
    Light
  • PDF

toLocaleLowerCase

  • Dark
    Light
  • PDF

Article summary

toLocaleLowerCase Task Purpose

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.

Properties

Input and output parameters are shown below.

Incoming Type Description
str String Required. The string to convert to lowercase.
locale String The locale to be used to convert to lowercase according to any locale-specific case mappings.


Outgoing Type Description
lowercaseString String A new string representing the incoming string converted to lowercase according to the current locale.

Example

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.

toLocaleLowercase-01

The expected end result will be that all of the letters from the Reference variable are now lowercase and show up as "hello world".

toLocaleLowercase-02

Further Reading

For more information on using the locales parameter, see the Intl article on the MDN site.


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.