Skip to content
Merged
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 dashboard/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import en from './locales/en.json';
import es from './locales/es.json';
import he from './locales/he.json';
import zhCN from './locales/zh-CN.json';
import zhHK from './locales/zh-HK.json';
Expand All @@ -10,13 +11,14 @@ import te from './locales/te.json';
import fr from './locales/fr.json';
import it from './locales/it.json';

export const supportedLanguages = ['en', 'he', 'zh-CN', 'zh-HK', 'ar', 'te', 'fr', 'it'] as const;
export const supportedLanguages = ['en', 'es', 'he', 'zh-CN', 'zh-HK', 'ar', 'te', 'fr', 'it'] as const;
export type SupportedLanguage = (typeof supportedLanguages)[number];

export const rtlLanguages: SupportedLanguage[] = ['he', 'ar'];

export const languageOptions: Array<{ value: SupportedLanguage; label: string; compactLabel: string }> = [
{ value: 'en', label: 'English', compactLabel: 'EN' },
{ value: 'es', label: 'Español', compactLabel: 'ES' },
{ value: 'he', label: 'עברית', compactLabel: 'עברית' },
{ value: 'zh-CN', label: '简体中文', compactLabel: '简中' },
{ value: 'zh-HK', label: '繁體中文', compactLabel: '繁中' },
Expand Down Expand Up @@ -48,6 +50,7 @@ void i18n
.init({
resources: {
en: { translation: en },
es: { translation: es },
he: { translation: he },
'zh-CN': { translation: zhCN },
'zh-HK': { translation: zhHK },
Expand Down
Loading