Browse Source

this is a start for #29

pull/2/head
gorhill 10 years ago
parent
commit
50bcc24049
  1. 7
      src/css/common.css
  2. 10
      src/js/i18n.js

7
src/css/common.css

@ -43,6 +43,13 @@
display: inline-block;
}
html {
direction: ltr;
}
html.rtl {
direction: rtl;
}
/* http://stackoverflow.com/questions/2011142/how-to-change-the-style-of-title-attribute-inside-the-anchor-tag?answertab=votes */
*[data-tip] {
position: relative;

10
src/js/i18n.js

@ -23,6 +23,16 @@
// jQuery must be present at this point.
window.addEventListener('load', function() {
// http://en.wikipedia.org/wiki/Right-to-left
var rtlLanguages = {
'ar': true,
'fa': true,
'he': true
};
if ( rtlLanguages[navigator.language] ) {
uDom('html').addClass('rtl');
}
var nodeList = document.querySelectorAll('[data-i18n]');
var i = nodeList.length;
var node;

Loading…
Cancel
Save