How to change the language without reloading the page using PHP / jQuery

I am working on a multilingual website right now. I am currently using the appropriate language file ('lange / _en.php') for language phrases. To change languages, users will select their language from the <select> element list. The thing I want to do is change the related phrases (and URLs, if possible) on the page without refreshing or posting the page.

I remember I saw something like this on the Internet, but I have no idea where.

Any help or any ideas on how to do this?

+3
source share
3 answers

, , . , .

  • , . , , JavaScript, , .

  • , AJAX <body> . ( ..), , script, settimeout() .

  • , , . . , . , , , , , .

. JavaScript, , .

+5

:

http://keith-wood.name/localisation.html

" ", .

0

if-modified .

The image takes the transmitted value and updates the language / country code (which is tied to the language) in the database and updates the image content (characters) in accordance with their keyboard layout.

Hope its use will be

0
source

All Articles