File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import { createIntl , createIntlCache } from "react-intl" ;
22import langEn from "./lang/en.json" ;
3+ import langRu from "./lang/ru.json" ;
34import langList from "./lang/lang-list.json" ;
45
56// first item of each array should be the language code,
67// not the country code
78// Remember when adding to this list, also update check-locales.js script
8- const localeOptions = [ [ "en" , "en-US" ] ] ;
9+ const localeOptions = [ [ "en" , "en-US" ] , [ "ru" , "ru-RU" ] ] ;
910
1011const loadMessages = ( locale ?: string ) : typeof langList & typeof langEn => {
1112 const thisLocale = locale || "en" ;
1213 switch ( thisLocale . slice ( 0 , 2 ) ) {
14+ case "ru" :
15+ return Object . assign ( { } , langList , langRu ) ;
1316 default :
1417 return Object . assign ( { } , langList , langEn ) ;
1518 }
1619} ;
1720
1821const getFlagCodeForLocale = ( locale ?: string ) => {
1922 switch ( locale ) {
23+ case "ru" :
24+ return "RU" ;
2025 default :
2126 return "EN" ;
2227 }
You can’t perform that action at this time.
0 commit comments