fix(i18n): add functions to retrieve document and pricing page languages (#19142)
This commit is contained in:
parent
d5ee465bf9
commit
3dff21e0be
4 changed files with 40 additions and 9 deletions
|
|
@ -39,6 +39,24 @@ export const getLanguage = (locale: string) => {
|
|||
return LanguagesSupported[0].replace('-', '_')
|
||||
}
|
||||
|
||||
const DOC_LANGUAGE: Record<string, string> = {
|
||||
'zh-Hans': 'zh-hans',
|
||||
'ja-JP': 'ja-jp',
|
||||
'en-US': 'en',
|
||||
}
|
||||
|
||||
export const getDocLanguage = (locale: string) => {
|
||||
return DOC_LANGUAGE[locale] || 'en'
|
||||
}
|
||||
|
||||
const PRICING_PAGE_LANGUAGE: Record<string, string> = {
|
||||
'ja-JP': 'jp',
|
||||
}
|
||||
|
||||
export const getPricingPageLanguage = (locale: string) => {
|
||||
return PRICING_PAGE_LANGUAGE[locale] || ''
|
||||
}
|
||||
|
||||
export const NOTICE_I18N = {
|
||||
title: {
|
||||
en_US: 'Important Notice',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue