Language specific CSS

Popular automatic website translation tool

Language specific CSS

Postby DF30000 » Thu Jul 18, 2013 1:34 pm

I have installed GTranslate and in Arabic text is read from right to left, this has caused the telephone number on my site to read right to left - I want to over ride the css for Arabic. I checked in FireBug but couldn't see obvious id or class. I even added the

<span class="notranslate"></span>

The telephone number is part of an unordered list

http://www.alvanblanchgroup.com/ar/

Also, the styling in the Arabic translated page has caused problems with image positioning, can you help to point me in the right direction?
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: Language specific CSS

Postby DF30000 » Thu Jul 18, 2013 2:01 pm

I haven't received an answer - I searched on the web and found and quick and dirty approach

Created a new css style

.ltr {
direction: ltr;
text-align: left;
unicode-bidi: bidi-override;
}

then added a span tag for the telephone number and it works but I haven't yet found a solution for language specific css - will keep on waiting and looking
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: Language specific CSS

Postby Yana » Thu Jul 18, 2013 7:47 pm

Hi,
You can detect current selected language and load your css.
For the GTRanslate Pro General version it is $_GET['glang'] variable.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4133
Joined: Thu Jan 12, 2012 6:21 pm

Re: Language specific CSS

Postby DF30000 » Thu Jul 18, 2013 7:58 pm

Thanks for the reply, not sure what to do with

$_GET['glang'] variable
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: Language specific CSS

Postby Yana » Thu Jul 18, 2013 9:24 pm

You should create css for Arabic , check current selected language and load the css file if the language is Arabic.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4133
Joined: Thu Jan 12, 2012 6:21 pm

Re: Language specific CSS

Postby DF30000 » Fri Jul 19, 2013 2:18 pm

Thanks Yana

Sorry if I sound abit dim, maybe because I am. I can create a css file, called maybe arabic.css, then add this to the info file for the Drupal site but do not understand what to do after that.

Can you explain "check current selected language and load the css file if the language is Arabic." I also do not know what to do with

$_GET['glang'] variable

on a Drupal 7 install? Thanks for your patience
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: Language specific CSS

Postby Yana » Fri Jul 19, 2013 6:12 pm

You need to create a small script which will check the current selected language and load your css file.
Please ask your web developer to create the script.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4133
Joined: Thu Jan 12, 2012 6:21 pm

Re: Language specific CSS

Postby DF30000 » Tue Jul 23, 2013 1:05 pm

Actually the reason i wanted this information was because when I translated my website into Arabic and because the language is read from rtl (right to left) this caused several of my layouts to go out of place. I decided the best solution in the end was to apply a direction:ltr to the disrupted layouts and they're now fine.
DF30000
 
Posts: 36
Joined: Fri Jul 12, 2013 6:09 pm

Re: Language specific CSS

Postby Yana » Wed Jul 24, 2013 1:25 am

Thank you for the information.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4133
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux