diff --git a/src/lang/en.json b/src/lang/en.json index cbb09a371..e7920978d 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -214,6 +214,7 @@ "tablet": "Tablet", "teachers": "Teachers", "thereisdatatosync": "There are offline {{$a}} to be synchronized.", + "thisdirection": "ltr", "time": "Time", "timesup": "Time is up!", "today": "Today", diff --git a/src/providers/lang.ts b/src/providers/lang.ts index 7395957f6..95dffb104 100644 --- a/src/providers/lang.ts +++ b/src/providers/lang.ts @@ -44,6 +44,11 @@ export class CoreLangProvider { moment.locale(language); }); }); + + translate.onLangChange.subscribe((event: any) => { + platform.setLang(event.lang, true); + platform.setDir(this.translate.instant('core.thisdirection'), true); + }); } /** diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 0ec8c8555..c5019ea2c 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -8,7 +8,7 @@ $font-path: "../assets/fonts"; // The app direction is used to include // rtl styles in your app. For more info, please see: // http://ionicframework.com/docs/theming/rtl-support/ -$app-direction: ltr; +$app-direction: multi; @import "ionic.globals";