getLocaleBySubdomain
Get the locale in a subdomain structure
Important: You must include the protocol (
http://
or https://
)- url: The url where to extract the locale
- defaultValue: The default value used for the main lang version without specifying a locale subdomain
- defaultLocale: The default locale to return when no locale is found
- String: The string with the locale
getLocaleBySubdomain("https://www.domain.com", "www", "ES")
// "ES"
getLocaleBySubdomain("https://en.domain.com", "www", "ES")
// "EN"
- Extract URL patterns in Sheets
- Extract subdomains in Spreadsheet
Last modified 7mo ago