D
D
Dima2018-12-26 12:09:59
Internationalization and localization
Dima, 2018-12-26 12:09:59

Multilingual site without CMS?

How to make multilingual on a business card site? So far, it only comes to mind, by clicking on the English flag, hide the Russian text and show English using js. There is also an option to store in the database and ajax ohm to load and replace the text. So it’s more correct and on the business card website you need to do something like that.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Michael, 2018-12-26
Dolgoter @SpiderPigAndCat

Take for example https://www.i18next.com/ and don't sweat it.

A
Alexander, 2018-12-26
@NeiroNx

Maybe it's better to use the lang attribute? At worst, make blocks of text with classes - languages ​​ru_RU, en_GB, en_US, and then only change the style of the tag with Javascript

<style>.ru_RU {display: block;} .en_US, .en_GB{display: none;}</style>

but sorting through all the elements is a perversion and is justified only if there are many languages ​​(more than 3).

K
ksnk, 2018-12-26
@ksnk

https://translate.yandex.ru/developers/website-widget - translator from Yandex. You will most likely have to hide the translate button and use your own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question