mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-16 16:25:56 +02:00
add getCurrentLocaleConfig utils
This commit is contained in:
parent
db7b2f334e
commit
98469e1099
1 changed files with 3 additions and 0 deletions
|
@ -115,6 +115,9 @@ export function localizePath({
|
|||
return normalizeUrl([originalPath, i18n.currentLocale, '/']);
|
||||
}
|
||||
|
||||
// TODO we may extract this to a separate package
|
||||
// we want to use it on the frontend too
|
||||
// but "docusaurus-utils-common" (agnostic utils) is not an ideal place since
|
||||
export function getCurrentLocaleConfig(i18n: I18n): I18nLocaleConfig {
|
||||
const localeConfig = i18n.localeConfigs[i18n.currentLocale];
|
||||
if (!localeConfig) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue