Title: Changing language using shortcode parameters
Last modified: August 22, 2016

---

# Changing language using shortcode parameters

 *  Resolved [CarpenterLT](https://wordpress.org/support/users/carpenterlt/)
 * (@carpenterlt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/)
 * Hi,
 * First – thank you for a great plugin!
    Now the question – how can I change the
   language using shortcode parameters. I know I can switch plugin language by switching
   whole WP site language, but this method is not suitable for me – EN should be
   kept as site language, and I need to switch only weather plugin language.
 * Thank you in advance!
 * Carpenter
 * [https://wordpress.org/plugins/awesome-weather/](https://wordpress.org/plugins/awesome-weather/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5908984)
 * At this time there is no way to do that. I have added it to my list of things
   to add. You can modify the plugin directly if you are comfortable doing so.
 * On line 94 of awesome-weather.php in the plugin folder you can add the following:
 * `$locale = "fr";`
 * And use the language code that you need there.
    Hope this helps for now.
 *  Thread Starter [CarpenterLT](https://wordpress.org/support/users/carpenterlt/)
 * (@carpenterlt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909029)
 * Thank you, Hal,
 * added line will last only until the next plugin update I suppose?
 * Carpenter
 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909076)
 * Yes, I will make sure the next release has a parameter to override the locale!
 *  [Tagomago](https://wordpress.org/support/users/tagomago/)
 * (@tagomago)
 * [11 years ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909248)
 * I’m having the same problem, my site is in 4 languages so I’d like the weather
   in each of those 4. Is modifying the plugin directly the only way to do this,
   if I’ve understood your previous reply correctly? I’m a complete novice to all
   this!
 *  [StamyO](https://wordpress.org/support/users/stamyo/)
 * (@stamyo)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909270)
 * **[resolved]** – Just change the general website’s language to the desire one
   after awesome-weather.php files modification and you will be all set.
    Hello 
   Hal, first of all I would like to thank you for this awesome plugin. I am setting
   up a website and I need the weather to be in German language. As you suggest 
   above I edit the $locale variable in awesome-weather.php file to $locale = “de”;
 * The problem here is that the output is still in English.
    Am I missing something
   here? Thnx in advance, StamyO
 *  [I.Angelakos](https://wordpress.org/support/users/iangelakos/)
 * (@iangelakos)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909272)
 * Hi Hal and congrats for your plugin…
 * A question:
 * I edited the awesome-weather.php as you say with the ‘el’ locale and i added 
   it in the $available_locales array cause it was missing. I checked in the languages
   folder tha el po exists….and everything seems ok… but the language in not changing!
 * Do i miss somethning?
 * You can check the widget at [http://www.diveness.gr](http://www.diveness.gr) 
   in the footer area.
 * Regards,
    John
 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909273)
 * In version 1.5.5 I released a few days ago. You can pass in the locale attribute.
   Here are the locales available:
 *     ```
       English - en
       Russian - ru
       Italian - it
       Spanish - es (or sp)
       Ukrainian - uk (or ua)
       German - de
       Portuguese - pt
       Romanian - ro
       Polish - pl
       Finnish - fi
       Dutch - nl
       French - fr
       Bulgarian - bg
       Swedish - sv (or se)
       Chinese Traditional - zh_tw
       Chinese Simplified - zh (or zh_cn)
       Turkish - tr
       Croatian - hr
       Catalan - ca
       ```
   
 *  [payute](https://wordpress.org/support/users/payute/)
 * (@payute)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909275)
 * First – thank you for a great plugin!!!
    I am setting up a website and I need
   the weather to be in Thailand language!! you can help me, please!
 *  [tintveld](https://wordpress.org/support/users/tintveld/)
 * (@tintveld)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909276)
 * Hi Hal,
 * I am very glad with your beautiful – sorry awesome – weather plug in. Have a 
   look at [http://www.villabalibreeze.de](http://www.villabalibreeze.de). I only
   wonder why only part of the widget is in German. I am a newbie in WordPress, 
   but how/where can I add/change $locale = “de”; Do I need ftp to do that?
 * Thanks,
    Ton
 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909277)
 * Hi [@tintveld](https://wordpress.org/support/users/tintveld/),
    I think your 
   WordPress installation needs to be set to German in order to bring in the other
   translations. The setting is located in ‘Settings’ -> ‘General’
 *  [tintveld](https://wordpress.org/support/users/tintveld/)
 * (@tintveld)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909278)
 * Thanks for your fast reply Hal.
    I already did set the language in Settings in
   German.
 *  Plugin Author [Hal Gatewood](https://wordpress.org/support/users/halgatewood/)
 * (@halgatewood)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909279)
 * ok great, have you also setup the WPLANG variable in wp-config.php
 * I just checked the translation file and it has been translated, so we just need
   to figure out why it’s not being used by WordPress.
 *  [tintveld](https://wordpress.org/support/users/tintveld/)
 * (@tintveld)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909280)
 * Well. My problem is that I don’t know how to change those files. That’s why I
   asked if I needed FTP to do that. By the way: the only language used in this 
   site is German.
 *  [tintveld](https://wordpress.org/support/users/tintveld/)
 * (@tintveld)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909281)
 * In the general settings of my theme X is told that I don’t need to change the
   WPLANG anymore.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Changing language using shortcode parameters’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/awesome-weather_ad7c7d.svg)
 * [Awesome Weather Widget](https://wordpress.org/plugins/awesome-weather/)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-weather/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-weather/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-weather/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-weather/reviews/)

 * 14 replies
 * 7 participants
 * Last reply from: [tintveld](https://wordpress.org/support/users/tintveld/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/changing-language-using-shortcode-parameters/#post-5909281)
 * Status: resolved