Skip to content

Commit

Permalink
Merge pull request sap-labs-france#587 from sap-labs-france/mobile-su…
Browse files Browse the repository at this point in the history
…pport_czech_language

cs_CZ instead of cz_CZ as locale
  • Loading branch information
LucasBrazi06 authored Dec 15, 2021
2 parents e83ebe7 + 7acc7e2 commit 6b82ba1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/I18n/I18nManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'moment/locale/en-gb';
import 'moment/locale/es';
import 'moment/locale/fr';
import 'moment/locale/it';
import 'moment/locale/cs';
import 'moment/locale/pt-br';

import i18n from 'i18n-js';
Expand All @@ -13,7 +14,7 @@ import { findBestAvailableLanguage, usesMetricSystem } from 'react-native-locali

import Constants from '../utils/Constants';
import Utils from '../utils/Utils';
import czJsonLanguage from './languages/cz.json';
import csJsonLanguage from './languages/cs.json';
import deJsonLanguage from './languages/de.json';
import enJsonLanguage from './languages/en.json';
import esJsonLanguage from './languages/es.json';
Expand Down Expand Up @@ -79,7 +80,7 @@ export default class I18nManager {
es: () => esJsonLanguage,
pt: () => ptJsonLanguage,
it: () => itJsonLanguage,
cz: () => czJsonLanguage
cs: () => csJsonLanguage
};
// Fallback if no available language fits
i18n.fallbacks = true;
Expand All @@ -93,7 +94,7 @@ export default class I18nManager {
i18n.translations.es = esJsonLanguage;
i18n.translations.pt = ptJsonLanguage;
i18n.translations.it = itJsonLanguage;
i18n.translations.cz = czJsonLanguage;
i18n.translations.cs = csJsonLanguage;
// Update layout direction
I18nReactNativeManager.forceRTL(isRTL);
// Default
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/utils/Constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { PagingParams } from '../types/QueryParams';
export default class Constants {
public static readonly REST_RESPONSE_SUCCESS = 'Success';

public static readonly SUPPORTED_LOCALES = ['en_US', 'fr_FR', 'de_DE', 'es_ES', 'pt_PT', 'it_IT', 'cz_CZ'];
public static readonly SUPPORTED_LANGUAGES = ['en', 'fr', 'de', 'es', 'pt', 'it', 'cz'];
public static readonly SUPPORTED_LOCALES = ['en_US', 'fr_FR', 'es_ES', 'de_DE', 'pt_PT', 'it_IT', 'cs_CZ', 'en_AU'];
public static readonly SUPPORTED_LANGUAGES = ['en', 'fr', 'de', 'es', 'pt', 'it', 'cs'];
public static readonly DEFAULT_LOCALE = 'en_US';
public static readonly DEFAULT_LANGUAGE = 'en';

Expand Down

0 comments on commit 6b82ba1

Please sign in to comment.