-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtl support #22
Comments
The framework does not support that. You will need to add a locale change event handler to the direction of the document from app.run(function ($rootScope, localeEvents, locale) {
function localeChangeHandler() {
var currentLocale = locale.getLocale();
if (currentLocale === 'ar-AR') {
angular.element(document.body).attr('direction', 'rtl')
} else {
angular.element(document.body).attr('direction', 'ltr')
}
}
$rootScope.$on(localeEvents.localeChanges, localeChangeHandler);
// do this the first time
localeChangeHandler();
}); I will be nice though, if the framework were to automatically maintain the html[lang="ar"] {
direction: rtl;
}
html[lang="en"] {
direction: ltr;
} |
@tolbahadi yes I was thinking about modifying the lang attribute of the html document on localeChanges. Do you want to open a PR? |
Angular-localization will now update the lang attribute of the root html tag to match the current locale's lang This closes doshprompt#22 because users can now use the lang attribute in their css to change the direction of the document and/or add any other language specific css Example: ```css html[lang=ar] { direction: rtl; } ```
Angular-localization will now update the `lang` attribute of the root `html` tag to match the current locale's language This closes doshprompt#22 because users can now use the lang attribute in their css to change the direction of the document and/or add any other language specific css Example: ```css html[lang=ar] { direction: rtl; } ```
Angular-localization will now update the `lang` attribute of the root `html` tag to match the current locale's language This closes doshprompt#22 because users can now use the lang attribute in their css to change the direction of the document and/or add any other language specific css Example: ```css html[lang=ar] { direction: rtl; } ```
Angular-localization will now update the `lang` attribute of the root `html` tag to match the current locale's language This closes doshprompt#22 because users can now use the lang attribute in their css to change the direction of the document and/or add any other language specific css Example: ```css html[lang=ar] { direction: rtl; } ```
Does angular localization supports rtl?.I mean if i select a rtl language,the directional context of the page is shifted from right to left.
The text was updated successfully, but these errors were encountered: