Weather App Language Support



  • Hello guys and Monaca Team @Fran-Diox @argelius @Andi

    I’m building an app with Open Wheater API like this >>

    http://monaca.mobi/en/blog/weather-app/

    Do u knows if there’s support to another languages ? Like Lang ="PT_BR’
    Example : In code below i have metric to set Celcius , the Longitude and Latidude …

      url: 'http://api.openweathermap.org/data/2.5/weather?lat=' + -29.3797216 + '&lon=' + -50.9014878 + '&units=metric&appid=****',
    
    

    I’d like to change the text below : Clouds , Rain …

    0_1460244943263_Screenshot_2016-04-09-20-30-15.jpg



  • Solved Here

      url: 'http://api.openweathermap.org/data/2.5/weather?lang=pt&lat=-29.3797216&lon=-50.9014878&units=metric&appid='*********',
    

    The problems was other thing

    $(’.weather-text’).html(json.weather[0].main); … returns Clouds in english
    $(’.weather-text’).html(json.weather[0].description); … Description returns the text in the current language. Portuguese!

    But during the “process” i have found an error in OpenWheater multilingual support . i’ve sent an email for them!


  • Monaca

    @Leonardo-Augusto I’m glad you were able to solve it! :)


Log in to reply