This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
admin_menu:languages:changing_languages_client_side [2013/07/19 17:33] geomatt [Create Links to Change Languages] |
admin_menu:languages:changing_languages_client_side [2014/09/25 16:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Changing Languages on the client side ====== | ====== Changing Languages on the client side ====== | ||
- | There is never a need to change any php file to be able to change languages. | + | This tutorial has been moved to our [[startup_tutorial_and_checklist:feature_configuration:multi_language_setup:changing_languages_on_client_side|configuration |
- | + | ||
- | ===== Getting to the Language Choice Form ===== | + | |
- | + | ||
- | The built in language choice page rests at **index.php? | + | |
- | + | ||
- | < | + | |
- | + | ||
- | + | ||
- | You will see the language choice form allowing the client to choose the language they wish to see the site in. | + | |
- | + | ||
- | ===== Create Links to Change Languages ===== | + | |
- | + | ||
- | You can also create links that will change the language for you instead of pushing the client through the language choice form. These links can be placed directly in your html design where you need them to be. Find the id of the language you wish to change to within the language admin tool. The language id can be found in a column next to the language name in the languages admin tool. The default language that comes with your installation is " | + | |
- | + | ||
- | <code html> | + | |
- | http:// | + | |
- | + | ||
- | or | + | |
- | + | ||
- | index.php? | + | |
- | </ | + | |
- | + | ||
- | and a link html text link would look something like this: | + | |
- | + | ||
- | < | + | |
- | <a href=" | + | |
- | or | + | |
- | <a href=" | + | |
- | </ | + | |
- | + | ||
- | and a "flag image" link would look something like this: | + | |
- | + | ||
- | < | + | |
- | <a href=" | + | |
- | or | + | |
- | <a href=" | + | |
- | </ | + | |
- | + | ||
- | Of course change the url to your own domain. | + | |
- | + | ||
- | ====Dynamic Links==== | + | |
- | + | ||
- | The above links would result in the user ending up on the front page of your site. If you want language selection to persist whatever other page a user might be viewing, it is possible, but requires template code that's a little fancier. Note that this code is provided for reference only and may require modifications to adapt to your use case. | + | |
- | + | ||
- | <code html> | + | |
- | {$lang = 24} | + | |
- | <a href=" | + | |
- | </ | + |