search

Home  >  Q&A  >  body text

How to achieve Chinese-English translation of the entire website?

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.

vinevine2574 days ago3052

reply all(6)I'll reply

  • vine

    vine2017-10-27 20:03:59

    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##

    reply
    0
  • ocean

    ocean2017-10-27 17:29:48

    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
    0
  • vine

    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 · 2017-10-27 19:37:08
  • lmaster

    lmaster2017-10-27 11:24:38

    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
    0
  • 稻草

    Search php internationalization on Baidu and see if you can find it!

    稻草 · 2017-10-27 16:28:33
    vine

    Most APIs now charge money.

    vine · 2017-10-27 19:37:41
  • Cancelreply