fix(i18n): add functions to retrieve document and pricing page languages (#19142)

This commit is contained in:
Wu Tianwei 2025-04-30 14:58:49 +08:00 • committed by GitHub
commit 3dff21e0be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 9 deletions

View file

@ -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',