Skip to content

Commit

Permalink
Merge pull request #1202 from dis-moi/fix/lememe.fr_loads_in_english_…
Browse files Browse the repository at this point in the history
…first

fix: lememe.fr loads in english first
  • Loading branch information
JalilArfaoui authored Dec 22, 2021
2 parents 29dc742 + 787566f commit 0f895d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import { initReactI18next } from 'react-i18next';
import { useFacetName } from '../facets/useFacetName.hook';
import resources from './resources';
import format from './format';
import { getFacet } from '../facets/getFacet';

export type SupportedLanguage = 'fr' | 'en' | 'br';
export const fallbackLng = 'en' as SupportedLanguage;
export const fallbackLng = (getFacet() === 'lmel'
? 'fr'
: 'en') as SupportedLanguage;
export const defaultLng = 'fr' as SupportedLanguage;
export const getCurrentLng = () => i18n.language as SupportedLanguage;

Expand Down

0 comments on commit 0f895d9

Please sign in to comment.