Creation:2026-01-21Last update:2026-01-21
Reference this doc to your favorite AI assistantChatGPTClaudeDeepSeekGoogle AI modeGeminiPerplexityMistralGrok
Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Init doc"v8.0.01/21/2026
Edit this doc
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy
Copy doc Markdown to clipboard
getLocale Function Documentation
The getLocale function allows you to detect the locale from a given string, such as a URL or a path.
Usage
Parameters
Show all table content
Open the table in a modal to view all data content clearly
| Parameter | Type | Description |
|---|---|---|
path | string | The path or string to extract the locale from. |
Returns
The detected locale, or the default locale if no locale is detected.