What is the process of a multilingual website?

recently, I am working on a multilingual website. I have a headache and hope that the gods can show me the way. Please

Mar.09,2021

if the website is very large, it is better to have more than one.
if not, you can get
the configuration file of the language
Chinese configuration

according to the browser address or the country set by the user.
{
     setting: ""
     ...
}

English configuration

{
     setting: "setting"
     ...
}

other configurations.
Front end load on demand

you can also use other operations such as database


use the i18n plug-in

for example,

jquery.i18n
vue-i18n
.


our company's website, app is multilingual, the current practice is that all the copywriting display information is configurable, and then there is a basic language, for example, you can use Chinese or English, and then translate it into other languages according to this basic language, and then store it. When outputting to the front end, you only need to read the corresponding configuration according to the current language configuration.

of course, if you don't have much copywriting information and languages, you can hard-code it in the program, but it will be much less maintainable.

Menu