How can PHP web pages turn English web pages into French?

Source: Internet
Author: User
How PHP web pages turn English web pages into French. I want to press a button. change all pages on a website from English to French. I want to ask if this can be implemented? If not, how can I change a single page from English to French? You can customize multiple languages, such as en_lang.php and fr_lang.php, and write all the variables into the language pack in two cases. How to convert an English webpage into a French webpage through the sess PHP webpage
For example, I want to change all the pages on a website from English to French by clicking a button.
I want to ask if this can be implemented? If not, how can I change a single page from English to French?
Please.

------ Solution --------------------
You can customize multiple languages, such as en_lang.php and fr_lang.php. multiple variables are written into the language pack in two cases.

Determine which file to call through session.
------ Solution --------------------
Static on the second floor is acceptable. call google APIs dynamically.
------ Solution --------------------
Use GG translation.

Add the following code to your webpage.

There are dozens of languages.

HTML code
Script function googleTranslateElementInit () {new google. translate. TranslateElement ({pageLanguage: 'en'}, 'Google _ translate_element ');} script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.