Commit 37043d68 authored by Neosoulink's avatar Neosoulink
Browse files

feat: french & spanish lang support | shop-mobile-ionic

parent 2da0988d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ export class AppComponent {
			'he-IL',
			'ru-RU',
			'es-ES',
			'fr-FR',
		]);

		_translateService.setDefaultLang('en-US');
@@ -52,7 +53,7 @@ export class AppComponent {
			_translateService.use(this.defaultLanguage);
		} else {
			_translateService.use(
				browserLang.match(/en-US|bg-BG|he-HE|ru-RU|es-ES/)
				browserLang.match(/en-US|bg-BG|he-HE|ru-RU|es-ES|fr-FR/)
					? browserLang
					: 'en-US'
			);
+11 −2
Original line number Diff line number Diff line
@@ -247,13 +247,22 @@ export class Store {

	private async _initLanguage() {
		const lang = (localStorage.getItem('_language') as ILanguage) || null;
		const langs = { he: 'he-IL', ru: 'ru-RU', bg: 'bg-BG', en: 'en-US' };
		// This 4 lines is here because of bug => without this lines, lang translation doesn't work.
		const langs = {
			he: 'he-IL',
			ru: 'ru-RU',
			bg: 'bg-BG',
			en: 'en-US',
			es: 'es-ES',
			fr: 'fr-FR',
		};
		// This 6 lines is here because of bug => without this lines, lang translation doesn't work.
		// (The bug is unknown)
		this._translateService.use(langs.he);
		this._translateService.use(langs.ru);
		this._translateService.use(langs.bg);
		this._translateService.use(langs.en);
		this._translateService.use(langs.es);
		this._translateService.use(langs.fr);
		this._translateService.resetLang(langs.en);

		if (lang) {
+2 −0
Original line number Diff line number Diff line
@@ -256,6 +256,8 @@
	"HEBREW": "Иврит",
	"RUSSIAN": "Руски",
	"BULGARIAN": "Български",
	"SPANISH": "испански",
	"FRENCH": "Френски",
	"SELECT": "Изберете",
	"LOCATION_NOTES": "Бележки за местоположението",
	"ENTER_NOTES_HERE": "Въведете бележки тук"
+1 −0
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@
	"RUSSIAN": "Russian",
	"BULGARIAN": "Bulgarian",
	"SPANISH": "Spanish",
	"FRENCH": "French",
	"SELECT": "Select",
	"LOCATION_NOTES": "Location Notes",
	"ENTER_NOTES_HERE": "Enter notes here"
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
	"RUSSIAN": "Ruso",
	"BULGARIAN": "Búlgaro",
	"SPANISH": "Español",
	"FRENCH": "Francés",
	"SELECT": "Seleccione",
	"LANGUAGE": {
		"ID": "es-ES",
Loading