JavaScript String toLocaleLowerCase() Method

You are Here:

JavaScript String toLocaleLowerCase() Method

The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.

Note: This method does not alter the original string.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <script> var str = "İstanbul"; // 'tr' = turkey var locale = 'tr'; var result = str.toLocaleLowerCase(locale); document.write(result); </script> </body> </html>

Syntax

str.toLocaleLowerCase(locale)

Parameter Values

ValueTypeExplanation
localeoptionalThe locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings.
If omitted, the default locale is the host environment’s current locale.

Return Value

ValueExplanation
StringReturns a new string representing the calling string converted to lower case, according to any locale-specific case mappings.

toLocaleLowerCase() vs toLowerCase()

In the following example, we will check whether toLocaleLowerCase() and toLowerCase() string methods return the same result.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <script> var str = "İstanbul"; // 'tr' = turkey var locale = 'tr'; var result1 = str.toLocaleLowerCase(locale); var result2 = str.toLowerCase(); document.write(result1 == result2); </script> </body> </html>

Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author