balazs-endresz / jquery-translate

Automatically exported from code.google.com/p/jquery-translate
5 stars 5 forks source link

Option to disable rtl switching #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using CSS Janus to mirror the whole site for rtl languages. The problem
is that jquery-translate is too switching the direction, something that
seems to cause bugs Internet Explorer (headings get text-align: left set,
even though they should be text-align: right). 

So, long story short, it would be helpful with an option to turn rtl
switching off in jquery-translate, for those of us that want to handle that
separately. 

Thanks for a great script!

Original issue reported on code.google.com by EmilStenstrom on 10 Jul 2009 at 11:16

GoogleCodeExporter commented 9 years ago
Yeah, an option for that would be indeed useful, but if some html is translated 
along with some text then 
Google will switch the direction and text-align for that part, which I can't 
control by the plugin. So by 
disabling this feature in the plugin, still some parts of the page would have 
different text-align 
properties. You can see this by running this code:

$.translate("<div>This is some text.</div>", "en", "ar", 
{complete:function(){alert(this.translation)}})

But in some cases only text is translated without html, and only that's where 
the plugin could handle the 
text-align and direction properties.

Original comment by balazs.endresz on 10 Jul 2009 at 4:47

GoogleCodeExporter commented 9 years ago
Thanks for your swift reply, I'll see if I can find a way to switch it off in
Google's APIs instead.

Original comment by EmilStenstrom on 11 Jul 2009 at 11:11