Skip to content

Commit

Permalink
India test (#3106)
Browse files Browse the repository at this point in the history
* add india homepage

* Add Indian homepage

* fix space

* in > hi
  • Loading branch information
tzarebczan authored May 31, 2024
1 parent 40922d5 commit 52d900f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions ui/constants/homepage_languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ const HOMEPAGE_LANGUAGES = {
ru: getLanguageEngName('ru'),
it: getLanguageEngName('it'),
'pt-BR': getLanguageEngName('pt-BR'),
hi: getLanguageEngName('hi'),
};

export function getHomepageLanguage(code) {
// -----override-----
if (code === 'zh-Hans' || code === 'zh-Hant') return HOMEPAGE_LANGUAGES.zh;
// ------------------

return HOMEPAGE_LANGUAGES[code] || null;
switch (code) {
case 'zh-Hans':
case 'zh-Hant':
return HOMEPAGE_LANGUAGES.zh;
case 'hi':
case 'pa':
case 'ur':
return HOMEPAGE_LANGUAGES.hi;
default:
return HOMEPAGE_LANGUAGES[code] || null;
}
}

export default HOMEPAGE_LANGUAGES;

0 comments on commit 52d900f

Please sign in to comment.