qTranslate-X – Get current language code

For those of you who use the qTranslate-X Plugin for WordPress here is a snippet with which you can get the code of the currently selected language.


Function that returns the language code:

You can use the function to run particular code for different languages:

Leave a Reply

Your email address will not be published. Required fields are marked *