Support » Plugin: Google Website Translator » detect current language?

  • Resolved o7abeeb


    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 ?

Viewing 1 replies (of 1 total)
  • Plugin Author Prisna



    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:


    Left to right:


    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.


Viewing 1 replies (of 1 total)
  • The topic ‘detect current language?’ is closed to new replies.