+ 2
How to add a language Dropbox
When creating a website, how do you add a language section where the viewers can change between different language of their preference?
5 Antworten
+ 2
it is used to indicate the language used... but it has no behavior defaulted to it.
you could use it to target elements to be displayed and to be hidden if you build a multi-lang single page ;)
you could also use google translate api to dynamically translate your text content...
+ 1
Hi! In the simple version, you create copies of this page in different languages. or do you know other ways?
+ 1
you could also write only one page with text contents duplicated and marked with some class name (one for each lang), then you are able to display only selected language and hide others ^^
(you should add some url parameter with language selected -- or store it in a cookie or webStorage -- and check it on page load to switch to the expected language)
0
what is the purpose of the <lang> attribute if it doesn’t change the webpage language?
0
You answered mu question. Thanks!