Multi language website is a website where the contents are written in multiple languages.
- Set the default or primary language for the website.
Example:
- Using HTML lang attribute to set different languages.
<!-- English -->
<html lang="en"></html>
<!-- Francais -->
<html lang="fr"></html>
- Writing contents in different languages.
Example:
- index.html for English.
- index.de.html for Deutsch.
<!-- English -->
https://www.booking.com/index.html
<!-- Deutsch -->
https://www.booking.com/index.de.html
- Another way is to sort out the domain names for each language.
Example:
- Domain name .com is for English.
- Domain name .de is for Deutsch.
<!-- English -->
https://www.google.com
<!-- Deutsch -->
https://www.google.de
- Length of the words will differ in each language.
- Size of font will differ. By using CSS :lang selector we can control it.
:lang(en) {
font-size: 100%;
}
:lang(de) {
font-size: 85%;
}
- Proper character encoding.
- Language direction is important. By using HTML dir attribute. We can control it.
<html dir="rtl"></html>
- Take care of links for other language versions of the site.
<a href="" hreflang="fr">French</a>
- For a better language recognition, it is better to keep one language per web page.
Some more information.