Title: detect current language?
Last modified: January 1, 2017

---

# detect current language?

 *  Resolved [o7abeeb](https://wordpress.org/support/users/o7abeeb/)
 * (@o7abeeb)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/detect-current-language/)
 * Hello, is there a way to detect the current translation language?
    i want to 
   add a custom class or add a custom css code if the current translation language
   is Arabic for example. is there a way ? Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Prisna](https://wordpress.org/support/users/prisna/)
 * (@prisna)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/detect-current-language/#post-8607874)
 * Greetings,
 * if you’re looking to style content depending on whether the language is right-
   to-left or left-to-right, then you should use the following CSS selectors:
 * Right to left:
 *     ```
       .translated-rtl
       ```
   
 * Left to right:
 *     ```
       .translated-ltr
       ```
   
 * For instance, if you were to change the text direction of a menu for Arabic (
   right to left), you should use:
 *     ```
       .translated-rtl #main_menu {
       	direction: rtl;
       }
       ```
   
 * Note: The _#main\_menu_ selector is just an arbitrary example, the real selector
   of a menu depends on the theme.
 * Regards

Viewing 1 replies (of 1 total)

The topic ‘detect current language?’ is closed to new replies.

 * ![](https://ps.w.org/google-website-translator/assets/icon-128x128.png?rev=1732883)
 * [Prisna GWT - Google Website Translator](https://wordpress.org/plugins/google-website-translator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-website-translator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-website-translator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-website-translator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-website-translator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-website-translator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Prisna](https://wordpress.org/support/users/prisna/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/detect-current-language/#post-8607874)
 * Status: resolved