Title: Set language programatically
Last modified: September 25, 2017

---

# Set language programatically

 *  Resolved [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/set-language-programatically/)
 * Can we set the translation programmatically either with js or php ?
    Auto language
   detection?

Viewing 1 replies (of 1 total)

 *  Plugin Author [edo888](https://wordpress.org/support/users/edo888/)
 * (@edo888)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/set-language-programatically/#post-9529634)
 * You can call doGTranslate javascript function. Like this:
 * `doGTranslate('en|es');`
 * Please check the source code for more details.

Viewing 1 replies (of 1 total)

The topic ‘Set language programatically’ is closed to new replies.

 * ![](https://ps.w.org/gtranslate/assets/icon-256x256.png?rev=2595917)
 * [Translate Wordpress with GTranslate](https://wordpress.org/plugins/gtranslate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gtranslate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gtranslate/)
 * [Active Topics](https://wordpress.org/support/plugin/gtranslate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gtranslate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gtranslate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [edo888](https://wordpress.org/support/users/edo888/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/set-language-programatically/#post-9529634)
 * Status: resolved