WebCiv now speaks four languages
· by nicroc
A game on the whole Earth that only speaks German? That does not go together. As of today WebCiv is available in four languages: German, English, Spanish and French.
The site notices where you come from
You do not have to set anything. The website looks at which language your browser prefers and presents itself in that language. If none of the four is among them, you get German. If you would rather choose yourself, you will find a small globe at the top right and the language selection at the bottom of every page. The site remembers the choice for a year.
The addresses stay the same for everyone. So anyone who passes on a link does not send a language along with it: your friend in Madrid sees the same page in Spanish.
What has been translated
Not just the home page. Also the login, the account, the “Ask me anything” chat, all messages in the forms, the password reset email and the complete map lab with its units and field descriptions. Even the numbers adapt: the 4.147.200 fields of the German version become 4,147,200 in English, and the date appears the way it is written in the respective language.
How we went about it
Until yesterday all texts sat directly in the pages, in German. The road to multilingualism had four steps:
- Extracting. Every single text was taken out of the pages and moved into a language file. In the end there were 514 texts, from the heading to the error message “There is already a figure there”.
- Translating. First into English, then into Spanish and French in parallel.
- Safeguarding. Since then an automated test has been comparing all four languages: if a text or a placeholder is missing anywhere, it raises the alarm before anyone notices it on the website.
- Telling the search engines. Every page now reveals in which languages it exists, so that someone in France also finds the French version.
There was one pitfall along the way: by default the automated tests behave as if every visitor came with an English browser. No sooner had the language detection been built in than all test pages were suddenly English, and quite a few tests searched in vain for German words.
A fifth language would now be nothing more than another folder of language files.
The diary too
At first this diary was meant to stay German. I write it the way it comes naturally to me, and that simply happens to be German. That lasted exactly half a day: after all, anyone who lands here in English, Spanish or French should also be able to read up on how WebCiv is made. So now all entries exist in all four languages. The writing continues in German; the translations follow each time.
The English, Spanish and French texts have been translated but not yet proofread by native speakers. If something strikes you as clumsy: feel free to tell me, via the chat or the contact form.
And the diary itself
While translating, something came to light: on the live site the diary was empty. The first entries existed only on my development machine. So today we wrote down the whole story from day 1 onwards, with all commits, and made sure that it lands on the server by itself with the next deployment.
Why this early?
Because 100 pioneers come together faster when it is not only the German-speaking world that can take part. And because it would simply be lovely if, in the first round, someone starts on the Nile who actually lives there.
Logbook: Wednesday, 11 November
- 12:37 ·
fdfa3abThe multilingual website: language detection, language switcher, four languages for all public pages, the chat and the map lab. 99 files, around 3,600 new lines, most of them translations. - 13:11 ·
5a833c5Six new diary entries and the mechanism that fills the diary once on the live server. - 13:21 ·
a2dcfc6The detailed version you are reading right now: all ten entries revised, each with a logbook. - In the afternoon The diary itself in English, Spanish and French.