mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 20:01:33 +02:00
refactor: theme config
This commit is contained in:
parent
8f8cda2717
commit
696fcfac07
15 changed files with 224 additions and 293 deletions
|
@ -8,21 +8,12 @@ export const langMap: Record<string, string[]> = {
|
|||
'ru': ['ru-RU'],
|
||||
}
|
||||
|
||||
// Waline Language Map
|
||||
// See more at https://waline.js.org/guide/i18n.html
|
||||
export const walineLocaleMap: Record<string, string> = {
|
||||
'zh': 'zh-CN',
|
||||
'zh-tw': 'zh-TW',
|
||||
'ja': 'jp-JP', // Waline uses jp-JP not ja-JP
|
||||
'en': 'en-US',
|
||||
'es': 'es-ES',
|
||||
'ru': 'ru-RU',
|
||||
}
|
||||
|
||||
// Standard Language Code
|
||||
// Standard Language Code (Unused)
|
||||
export const langCode = Object.values(langMap).flat()
|
||||
|
||||
// Abbreviated Language Code
|
||||
export const langPath = Object.keys(langMap).flat()
|
||||
|
||||
// UI Translation
|
||||
export const ui = {
|
||||
'zh': {
|
||||
|
@ -57,6 +48,17 @@ export const ui = {
|
|||
},
|
||||
}
|
||||
|
||||
// Waline Language Map
|
||||
// See more at https://waline.js.org/guide/i18n.html
|
||||
export const walineLocaleMap: Record<string, string> = {
|
||||
'zh': 'zh-CN',
|
||||
'zh-tw': 'zh-TW',
|
||||
'ja': 'jp-JP', // Waline uses jp-JP not ja-JP
|
||||
'en': 'en-US',
|
||||
'es': 'es-ES',
|
||||
'ru': 'ru-RU',
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the language code of Waline
|
||||
* @param currentPath Current page path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue