lbry-desktop/ui/constants/homepage_languages.js
infinite-persistence cc0ed44bf6 Homepage: add "reset" + 'hideByDefault' categories
Requires a related commit from the homepages repo.

## Changes
- Add ability to reset the sort order.
- Make 'News' and 'Wild West' a "hideByDefault" category. It can be made visible in the homepage from the customization dialog.
2022-05-26 10:59:31 -04:00

21 lines
576 B
JavaScript

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;