Menu

French Users Saw "Overcast Clouds". I Didn't Ask the Weather API for French.
📰

French Users Saw "Overcast Clouds". I Didn't Ask the Weather API for French.

DEV Community: ruby·MarcoBlch·3 days ago
#2JWi14cg
#devtoruby#devto#dev#label#weather
Long article (1289 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on meridianbuild.dev , my build log for OutfitMaker , an AI outfit planner that works from the clothes you already own.

OutfitMaker suggests outfits from the clothes you already own, and the weather is part of the suggestion. On the home screen, the calendar and the suggestion page, there is a small line with the temperature and the sky: "12° · Overcast Clouds".

The app is in five languages: English, French, Spanish, German and Portuguese. Every member saw that line in English. A French member got a page entirely in French, then "Overcast Clouds" in the middle of it, with a capital C that English doesn't even use.

The fix looked like one line. It wasn't, and the reason is the useful part of this post.

The one line fix

The weather comes from OpenWeather. The description ("overcast clouds", "light rain", "few clouds") is whatever the API sends back, and OpenWeather has a lang parameter that returns the description in the user's language.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.