- "description": "Set locale based on matching a regular expression against the URL.\n\nThe regexp will be matched against `window.location.href`, and the first\ncapturing group will be used as the locale. If no match is found, or if\nthe capturing group does not contain a valid locale code, then\n`defaultLocale` is used.\n\nOptionally use the special string `:LOCALE:` to substitute a capturing\ngroup into the regexp that will only match the currently configured\nlocale codes (`sourceLocale` and `targetLocales`). For example, if\nsourceLocale=en and targetLocales=es,zh_CN, then the regexp\n\"^https?://:LOCALE:\\\\.\" becomes \"^https?://(en|es|zh_CN)\\\\.\".\n\nTips: Remember to double-escape literal backslashes (once for JSON, once\nfor the regexp), and note that you can use `(?:foo)` to create a\nnon-capturing group.\n\nIt is an error to set both `regexp` and `param`.\n\nExamples:\n\n1. \"^https?://[^/]+/:LOCALE:(?:$|[/?#])\"\n\n Set locale from the first path component.\n\n E.g. https://www.example.com/es/foo\n ^^\n\n2. \"^https?://:LOCALE:\\\\.\"\n\n Set locale from the first subdomain.\n\n E.g. https://es.example.com/foo\n ^^",
0 commit comments