diff --git a/src/i18n/i18n-loader.js b/src/i18n/i18n-loader.js index 7e1fb5b..031664c 100644 --- a/src/i18n/i18n-loader.js +++ b/src/i18n/i18n-loader.js @@ -20,17 +20,50 @@ import enLocale from 'react-intl/locale-data/en'; import es419Locale from 'react-intl/locale-data/es'; import frLocale from 'react-intl/locale-data/fr'; import zhcnLocale from 'react-intl/locale-data/zh'; +import caLocale from 'react-intl/locale-data/ca'; +import heLocale from 'react-intl/locale-data/he'; +import idLocale from 'react-intl/locale-data/id'; +import kokrLocale from 'react-intl/locale-data/ko'; +import plLocale from 'react-intl/locale-data/pl'; +import ptbrLocale from 'react-intl/locale-data/pt'; +import ruLocale from 'react-intl/locale-data/ru'; +import thLocale from 'react-intl/locale-data/th'; +import ukLocale from 'react-intl/locale-data/uk'; import COUNTRIES, { langs as countryLangs } from 'i18n-iso-countries'; import LANGUAGES, { langs as languageLangs } from '@cospired/i18n-iso-languages'; import arMessages from './messages/ar.json'; +import caMessages from './messages/ca.json'; // no need to import en messages-- they are in the defaultMessage field import es419Messages from './messages/es_419.json'; import frMessages from './messages/fr.json'; import zhcnMessages from './messages/zh_CN.json'; +import heMessages from './messages/he.json'; +import idMessages from './messages/id.json'; +import kokrMessages from './messages/ko_kr.json'; +import plMessages from './messages/pl.json'; +import ptbrMessages from './messages/pt_br.json'; +import ruMessages from './messages/ru.json'; +import thMessages from './messages/th.json'; +import ukMessages from './messages/uk.json'; -addLocaleData([...arLocale, ...enLocale, ...es419Locale, ...frLocale, ...zhcnLocale]); +addLocaleData([ + ...arLocale, + ...enLocale, + ...es419Locale, + ...frLocale, + ...zhcnLocale, + ...caLocale, + ...heLocale, + ...idLocale, + ...kokrLocale, + ...plLocale, + ...ptbrLocale, + ...ruLocale, + ...thLocale, + ...ukLocale, +]); // TODO: When we start dynamically loading translations only for the current locale, change this. COUNTRIES.registerLocale(require('i18n-iso-countries/langs/ar.json')); @@ -38,20 +71,49 @@ COUNTRIES.registerLocale(require('i18n-iso-countries/langs/en.json')); COUNTRIES.registerLocale(require('i18n-iso-countries/langs/es.json')); COUNTRIES.registerLocale(require('i18n-iso-countries/langs/fr.json')); COUNTRIES.registerLocale(require('i18n-iso-countries/langs/zh.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/ca.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/he.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/id.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/ko.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/pl.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/pt.json')); +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/ru.json')); +// COUNTRIES.registerLocale(require('i18n-iso-countries/langs/th.json')); // Doesn't exist in lib. +COUNTRIES.registerLocale(require('i18n-iso-countries/langs/uk.json')); // TODO: When we start dynamically loading translations only for the current locale, change this. -// TODO: Also note that Arabic (ar) and Chinese (zh) are missing here. That's because they're -// not implemented in this library. If you read this and it's been a while, go check and see -// if that's changed! +// TODO: Also note that a bunch of languages are missing here. They're present but commented out +// for reference. That's because they're not implemented in this library. If you read this and it's +// been a while, go check and see if that's changed! +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/ar.json')); LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/en.json')); LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/es.json')); LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/fr.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/zh.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/ca.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/he.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/id.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/ko.json')); +LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/pl.json')); +LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/pt.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/ru.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/th.json')); +// LANGUAGES.registerLocale(require('@cospired/i18n-iso-languages/langs/uk.json')); const messages = { // current fallback strategy is to use the first two letters of the locale code ar: arMessages, es: es419Messages, fr: frMessages, zh: zhcnMessages, + ca: caMessages, + he: heMessages, + id: idMessages, + ko: kokrMessages, + pl: plMessages, + pt: ptbrMessages, + ru: ruMessages, + th: thMessages, + uk: ukMessages, }; const cookies = new Cookies(); diff --git a/src/i18n/messages/ca.json b/src/i18n/messages/ca.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/ca.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/he.json b/src/i18n/messages/he.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/he.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/id.json b/src/i18n/messages/id.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/id.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/ko_kr.json b/src/i18n/messages/ko_kr.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/ko_kr.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/pl.json b/src/i18n/messages/pl.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/pl.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/pt_br.json b/src/i18n/messages/pt_br.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/pt_br.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/ru.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/th.json b/src/i18n/messages/th.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/th.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file diff --git a/src/i18n/messages/uk.json b/src/i18n/messages/uk.json new file mode 100644 index 0000000..71d3e37 --- /dev/null +++ b/src/i18n/messages/uk.json @@ -0,0 +1,11 @@ +{ + "siteheader.links.courses": "Courses", + "siteheader.links.programs": "Programs & Degrees", + "siteheader.links.schools": "Schools & Partners", + "siteheader.user.menu.dashboard": "Dashboard", + "siteheader.user.menu.profile": "Profile", + "siteheader.user.menu.account.settings": "Account", + "siteheader.user.menu.logout": "Logout", + "siteheader.user.menu.login": "Login", + "siteheader.user.menu.register": "Sign Up" +} \ No newline at end of file