Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/renderer/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { DEFAULT_GOD_NAME } from '@shared/godIdentity';
import en from './locales/en.json';
import ptBR from './locales/pt-BR.json';
import zhCN from './locales/zh-CN.json';
import ar from './locales/ar.json';

Expand All @@ -34,6 +35,7 @@ import ar from './locales/ar.json';
*/
export const LANGUAGES = [
{ code: 'en', label: 'English', dir: 'ltr' },
{ code: 'pt-BR', label: 'Português (Brasil)', dir: 'ltr' },
{ code: 'zh-CN', label: '简体中文', dir: 'ltr' },
{ code: 'ar', label: 'العربية', dir: 'rtl' }
] as const;
Expand Down Expand Up @@ -109,12 +111,13 @@ void i18n
.init({
resources: {
en: { translation: en },
'pt-BR': { translation: ptBR },
'zh-CN': { translation: zhCN },
ar: { translation: ar }
},
lng: detectLanguage(),
fallbackLng: 'en',
supportedLngs: ['en', 'zh-CN', 'ar'],
supportedLngs: ['en', 'pt-BR', 'zh-CN', 'ar'],
// Resources are bundled inline, so nothing ever suspends — the string is
// there at init time. Keeping this false lets every component call
// useTranslation() without wrapping the tree in <Suspense>.
Expand Down
Loading
Loading