MOBILE-649 lang: Set text direction depending on language

main
Pau Ferrer Ocaña 2018-07-31 11:26:15 +02:00
parent 2875f5c1d4
commit ce0411aa4d
3 changed files with 7 additions and 1 deletions

View File

@ -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",

View File

@ -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);
});
}
/**

View File

@ -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";