Skip to content

Commit

Permalink
Add villages
Browse files Browse the repository at this point in the history
  • Loading branch information
ericboucher committed Oct 4, 2024
1 parent 313c95d commit ef90150
Show file tree
Hide file tree
Showing 5 changed files with 32,543 additions and 3,384 deletions.
14 changes: 12 additions & 2 deletions apps/frontend/providers/Intl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ import { IntlProvider } from 'react-intl';

import { useLanguageContext } from 'context';
import { flattenMessages } from 'services/intl';
import communes from 'translations/communes.json';
import en from 'translations/en.json';
import km from 'translations/km.json';
import villages from 'translations/villages.json';

export const loadLocaleData = (locale: string) => {
switch (locale) {
case 'km':
return flattenMessages(km);
return flattenMessages({
...km,
commune: communes['km'],
village: villages['km'],
});
case 'en':
return flattenMessages(en);
return flattenMessages({
...en,
commune: communes['en'],
village: villages['en'],
});
}
};

Expand Down
Loading

0 comments on commit ef90150

Please sign in to comment.