mirror of
https://github.com/parsis-foundation/parsis.foundation.git
synced 2026-10-30 20:47:22 +00:00
- Transform from personal site to foundation/NGO site - Focus on education, research, AI, cryptography, open governance - Update all translations and navigation - Update package.json metadata
17 lines
361 B
TypeScript
17 lines
361 B
TypeScript
import en from './en.json';
|
|
import fa from './fa.json';
|
|
|
|
export type Locale = 'en' | 'fa';
|
|
|
|
export const translations = { en, fa } as const;
|
|
|
|
export type TranslationKeys = typeof en;
|
|
|
|
export function getTranslation(locale: Locale): TranslationKeys {
|
|
return translations[locale];
|
|
}
|
|
|
|
export function isRTL(locale: Locale): boolean {
|
|
return locale === 'fa';
|
|
}
|