How to select a drop-down list to display the corresponding language

Source: Internet
Author: User
How can I select a drop-down list to display the corresponding language and language problems? I am using gettext for multiple languages now. I don't know how to solve these problems:

I. Select a drop-down list to display the corresponding language. (Select a drop-down list to display the corresponding language. do not click a button or the like)

II. Sometimes, after data is queried, you can switch the language.


Reply to discussion (solution)

1. bind the onchange event to the select control, and then perform corresponding operations.
2. pass the session value

Can I provide an example for jordan102?

I. In the onchange event, how can we convert the page to a new language? if we get the url of the current page, we will have the lang parameter in it.
My link is www.1234756.com? Lang = en

II. Can you give a specific example?

Thanks, xuzuning. How can I pass the value through the session? I mean to use the drop-down list box, such as your post query, you can write it like this: session_start (); if (isset ($ _ SESSION ['key']) {$ key = $ _ SESSION ['key'];} else {$ key = $ _ POST ['key']; $ _ SESSION ['key'] = $ _ POST ['key'];} ...... ....

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.