Skip to content

Commit

Permalink
Added Irish language
Browse files Browse the repository at this point in the history
  • Loading branch information
aindriu80 committed Feb 13, 2024
1 parent 56aa81e commit c34b7f2
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,40 @@ const languageList = {
"nl-NL": "Nederlands",
"nb-NO": "Norsk",
"es-ES": "Español",
"eu": "Euskara",
"fa": "Farsi",
eu: "Euskara",
fa: "Farsi",
"pt-PT": "Português (Portugal)",
"pt-BR": "Português (Brasileiro)",
"fi": "Suomi",
fi: "Suomi",
"fr-FR": "Français (France)",
"he-IL": "עברית",
"hu": "Magyar",
hu: "Magyar",
"hr-HR": "Hrvatski",
"it-IT": "Italiano (Italian)",
"id-ID": "Bahasa Indonesia (Indonesian)",
"ja": "日本語",
ja: "日本語",
"da-DK": "Danish (Danmark)",
"sr": "Српски",
sr: "Српски",
"sl-SI": "Slovenščina",
"sr-latn": "Srpski",
"sv-SE": "Svenska",
"tr-TR": "Türkçe",
"ko-KR": "한국어",
"ru-RU": "Русский",
"zh-CN": "简体中文",
"pl": "Polski",
pl: "Polski",
"et-EE": "eesti",
"vi-VN": "Tiếng Việt",
"zh-TW": "繁體中文 (台灣)",
"uk-UA": "Українська",
"th-TH": "ไทย",
"el-GR": "Ελληνικά",
"yue": "繁體中文 (廣東話 / 粵語)",
"ro": "Limba română",
"ur": "Urdu",
"ge": "ქართული",
"uz": "O'zbek tili",
yue: "繁體中文 (廣東話 / 粵語)",
ro: "Limba română",
ur: "Urdu",
ge: "ქართული",
uz: "O'zbek tili",
ga: "Gaeilge",
};

let messages = {
Expand All @@ -52,16 +53,18 @@ let messages = {

for (let lang in languageList) {
messages[lang] = {
languageName: languageList[lang]
languageName: languageList[lang],
};
}

const rtlLangs = [ "fa", "ar-SY", "ur" ];
const rtlLangs = ["fa", "ar-SY", "ur"];

Check warning on line 60 in src/i18n.js

View workflow job for this annotation

GitHub Actions / check-linters

A space is required after '['

Check warning on line 60 in src/i18n.js

View workflow job for this annotation

GitHub Actions / check-linters

A space is required before ']'

export const currentLocale = () => localStorage.locale
|| languageList[navigator.language] && navigator.language
|| languageList[navigator.language.substring(0, 2)] && navigator.language.substring(0, 2)
|| "en";
export const currentLocale = () =>
localStorage.locale ||
(languageList[navigator.language] && navigator.language) ||
(languageList[navigator.language.substring(0, 2)] &&
navigator.language.substring(0, 2)) ||
"en";

export const localeDirection = () => {
return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr";
Expand Down

0 comments on commit c34b7f2

Please sign in to comment.