DeZZigneRR Posted September 29, 2020 Share Posted September 29, 2020 What is the most logical way to organise a website available in several different languages? One option would be to make separate pages for every language. However, it wouldn't make much sense since the content in each of the languages will not be that huge and I would rather do something like only one page containing all the text in all languages written one after another, organising the different languages as classes and then once the visitor selects a language it only shows the text that is tagged as this language. What would be the simplest way to do it? Can it be done with CSS only, or I guess I need JavaScript (never programmed anything in JavaScript yet), and I will probably need some memory / cookies to save the language preference maybe? I'm a complete amateur with virtually no well-designed and functioning websites behind my back, but I think once I get the right logic I will be able to do it with a little bit of googling of the different steps I am trying to redesign my website from scratch without using WordPress at the moment. I browsed through different possibilities and similar questions on this website, but the possibilities seem to be many and I'm looking for someone who will be willing to point me to the right course of action. PS Is this the right sub-forum to ask the question in? There's General but it's written that it's for discussing W3Schools, while everything else is very specific. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 29, 2020 Share Posted September 29, 2020 Look up data-i18n, as used by wikipedia, you add translation of text in json file to specific language, when page loads you set language to use and it searches for data-i18n attribute and translate key value to the selected language. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now