• Resolved gri0

    (@gri0)


    I have a problem. The openweather site have some changes and my old shortcodes do not working correctly now.
    The code is:
    [wcp_weather id="wcp_openweather_55ffade1e9dcc" city="Фантхьет, Бин Туан, Вьетнам" city_data="city=Фантхьет&city_short=Фантхьет&state=Бин Туан&state_short=Бин Туан&country=Вьетнам&country_short=VN&full_name=Фантхьет, Бин Туан, Вьетнам&short_name=Фантхьет, VN&lat=10.933333&lng=108.10000000000002" tempUnit="c" windSpeedUnit="ms" pressureUnit="mmHg" template="default" showForecastWeather="on" showCurrentWeather=""]
    All I need to do now, just change the city name by city ID from https://bulk.openweathermap.org/sample/city.list.json.gz
    I have try to find some additional info about shortcodes but can’t.
    Help me please, how to add cityID to the code to the shortcode to show correct weather.
    The cityID is 1571058

    https://www.ads-software.com/plugins/wcp-openweather/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter gri0

    (@gri0)

    If I just change the city="Фантхьет, Бин Туан, Вьетнам" to city="1571058" the weather showing correct, but the name of the city is changing to english name.

    Plugin Author WebCodin

    (@webcodin)

    Hi gri0,

    On our demo site all is working properly: https://wpdemo.webcodin.com/weather-forecast/.
    Also, as test, we’ve added a new shortcode and it is working properly, as well as shortcode that you sent. So, seems OpenWeather did not add critical changes that can break existed plugin functionality. However we’ll check your information after weekend.

    Try, to update plugin to last version and recreate shortcode. If this won’t help, please send link on your site here or via direct support email: [email protected].

    Thread Starter gri0

    (@gri0)

    Yes, please check it when you have a free time. For now Hello!
    The problem is to find
    “phan thiet, vn”
    “nha trang, vn”
    even “hanoi, vn”
    https://www.openweathermap.com/find?q=hanoi%2C+vn
    Before I found the cities in Russian language without any problems.

    I have check your link with the live demo. You have only one field Location “city”. But what if I want to use the CityID and CityName?
    I want to able to change the city name to different language. Is it possible?

    Great plugin! Have a nice weekend!

    Plugin Author WebCodin

    (@webcodin)

    As noted in the plugin description:

    Multilanguage functionality has limitation based on OpenWeatherMap API languages support, i.e. city name has no translation for city name by default and description of weather conditions have translation only for languages form OpenWeatherMap API list.
    Currently, translation of the city names realized via Google autocomplete for city name based on active language for the plugin.

    You can disabled Google autocomplete in the plugin settings (Plugin Tab > Enable “Google Maps API”) and add necessary value manually (possible CityID also will work, we didn’t test it), however, in this case you’ll get city name directly form OpenVeather without translation.

    Also, what problem you have with described cities? Seems it can be found with Google autocomplete without issues: https://clip2net.com/s/3AK8nBa and result on the site frontend – https://clip2net.com/s/3AK8uxs.

    Plugin Author WebCodin

    (@webcodin)

    Hi gri0,

    In additional to described above.

    Our developers didn’t find any information about the changes in the OpenWeatherMap API.
    At the moment, plugin with initial configuration (without any customization from a user side) works properly. Translation of the city name based on Google Autocomplete works properly. In case if Google Autocomplete is turned off in the plugin settings, location field works with city name and city ID in allowed by OpenWeaterMap format.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘weather shortcode’ is closed to new replies.