Step 3: Language Selection

Congratulations! You are now ready for the final step: adding the option to select the language.

The selection may be done automatically in JavaScript based on the language property read in the navigator object of the browser, for example fr-FR for French/France.

Alternatively, the language selection may be proposed as a list available either in all pages or only in the application settings.

Besides, for testing purpose, it is convenient to allow changing the language by adding a parameter in the URL.

Let me help you
at Step 3: Language Selection

Common pitfall: Search Engine Optimization

Is your multilingual content visible to search engines? Depending on the technique used to select and advertise the language, your contents may be indexed only in English, or not at all.

Extra attention is needed to ensure that static contents is available to search engines in all available languages: the HTML page must include a lang attribute with the language tag, e.g. lang="en" for English and lang="fr" for French.

It is also possible to include several languages within the same HTML document by tagging each part with the relevant language tag.