What is the best way to serve a page with multiple languages?

What is the best way to serve a page with multiple languages?
0

#1

For example http://www.un.org/ has many different languages available.

Would you think they are rebuilding the site in each language? or is there a way they could edit say the size of a div globally in every language?


#2

The size of a particular div would be determined in the CSS style sheet. I haven’t looked too closely at the site, but it is likely that they have templates for their pages and have translators working on providing the same content in the various languages they serve.


#3

Yeah the div size thing was probably a bad example since the stylesheets wouldn’t need to change. Just wondering what a good structure for a site with multiple languages would be.

Right now I’m thinking it might be most efficient to have text content all in a JSON file and use something to compile an HTML template for each language version. The goal being to not have to paste in each block of text in a different language.

I saw W3C has some guidelines for how to define a language for each page/tell the browser what language it is. But I’m curious if there is any standard on how to organize a site like this.


#4

Maybe this will help? https://phraseapp.com/blog/posts/10-common-mistakes-in-software-localization/


#5

Yes that is exactly what I was looking for, much appreciated!