• Resolved CarpenterLT

    (@carpenterlt)


    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/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Hal Gatewood

    (@halgatewood)

    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

    (@carpenterlt)

    Thank you, Hal,

    added line will last only until the next plugin update I suppose?

    Carpenter

    Plugin Author Hal Gatewood

    (@halgatewood)

    Yes, I will make sure the next release has a parameter to override the locale!

    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!

    [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

    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 in the footer area.

    Regards,
    John

    Plugin Author Hal Gatewood

    (@halgatewood)

    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

    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!

    Hi Hal,

    I am very glad with your beautiful – sorry awesome – weather plug in. Have a look at 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

    (@halgatewood)

    Hi @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’

    Thanks for your fast reply Hal.
    I already did set the language in Settings in German.

    Plugin Author Hal Gatewood

    (@halgatewood)

    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.

    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.

    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.