2022-03-02 15:44:01 +01:00
|
|
|
import { getLanguageEngName } from 'constants/languages';
|
|
|
|
|
|
|
|
const HOMEPAGE_LANGUAGES = {
|
|
|
|
en: getLanguageEngName('en'),
|
|
|
|
fr: getLanguageEngName('fr'),
|
|
|
|
es: getLanguageEngName('es'),
|
|
|
|
de: getLanguageEngName('de'),
|
|
|
|
zh: getLanguageEngName('zh'),
|
|
|
|
ru: getLanguageEngName('ru'),
|
|
|
|
'pt-BR': getLanguageEngName('pt-BR'),
|
|
|
|
};
|
|
|
|
|
|
|
|
export function getHomepageLanguage(code) {
|
|
|
|
// -----override-----
|
|
|
|
if (code === 'zh-Hans' || code === 'zh-Hant') return HOMEPAGE_LANGUAGES.zh;
|
|
|
|
// ------------------
|
|
|
|
|
|
|
|
return HOMEPAGE_LANGUAGES[code] || null;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default HOMEPAGE_LANGUAGES;
|
2022-04-19 08:09:57 +02:00
|
|
|
|
2022-04-19 09:12:54 +02:00
|
|
|
export const HOMEPAGE_EXCLUDED_CATEGORIES = Object.freeze(['NEWS', 'WILD_WEST']);
|