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 54eab21
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const languageList = {
"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 54eab21

Please sign in to comment.