How to achieve Chinese-English translation of the entire website?
vine
vine 2017-10-27 11:11:36
0
6
3077

In a recent project, a website needs to be switched between Chinese and English. It has been a long time since it was completed? Is there any practical method that can be used? Just use two templates. The Chinese version is already online. Now I just want to add a switching function.

vine
vine

reply all(3)
vine

Uniform reply: I searched for various information, but in the end I still had no choice, so I made another English website and database.

In collecting information, I found that most APIs now require payment, and there are very few that can translate the entire site for free. However, Bing Translate has a plug-in that is very useful. The disadvantage is that it is too ugly, cannot modify the style, is not easy to embed into web pages, and the translation is inaccurate. However, the speed is really fast. I recommend it to students who need it. The renderings are as follows. This method should only be used as a last resort. If you want accurate translation, it is better to find a professional to translate it, and it is best to use a database for storage.



捕获.PNG捕获2.PNG##

phpcn_u50540

Use lang to implement, that is to say, when you want to display specific content, use the corresponding key in lang. Change the key to a specific content in Chinese and a specific content in English. Finally, you need to display that content. It depends on which language the user chooses (Chinese or English)

  • reply To translate some content in the database, using keys is too cumbersome, because the backend database can be updated by customers at any time.
    vine author 2017-10-27 19:37:08
lmaster

This depends on their needs. If it is just navigation and other fixed things that require English, then use lang. You can learn tp's lang. If it is English for the whole site, then you need to find a Chinese-English converter. Baidu and Tencent seem to have APIs

  • reply Search php internationalization on Baidu and see if you can find it!
    稻草 author 2017-10-27 16:28:33
  • reply Most APIs now charge money.
    vine author 2017-10-27 19:37:41
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template