My website is currently in English, and I would like to offer a possibility to read it in Dutch. So I’m translating my website and there will be 2 different languages available.
It’s built with HTML, CSS and JS (those are my languages right now, JS is not that strong yet). The website doesn’t change often, and I’m not writing a blog or anything similar for now.
- What would be the best approach in translating them?
- Will there be problems with SEO and duplicated content if I upload
the same page + content in a different language? - How do I write it in HTML?
- Is there a way to automatically detect the right language?
Thanks!
2
Answers
There are many ways to do that. One of these is to keep both text contents inside the HTML tag with
data-something
then later pick it using Javascript+CSS when necessary.Using CSS variables:
Level entry internationalization is achieved by using style properties:
Duplicating content does not impact SEO, in particular if you give some keywords. Also SEO can be language dependent, but surely having differentiated content for different laguages improves the research: in the snippet simple example you can find the site by searching either "My English text" or "Mein deutscher Text" or any other content.
For a more deep approach i suggest to use i18n (MDN) API that are broadly supported in latest browsers