logicopinion Posted April 19, 2008 Share Posted April 19, 2008 Hello, i have a site on three languages: 1. GEORGIAN 2. ENGLISH 3. RUSSIAN so, i habe three buttons on the top of page. Like : GEO, ENG, RUS, The URL of them looks like this: <a href="index.php?lang_id=geo">geo</a> <a href="index.php?lang_id=eng">eng</a> <a href="index.php?lang_id=rus">rus</a> and it works fine. i have other problem/thing to solve. forexample: if i navigate to page having URL index.php?page=news&news_id=123&lang_id=geo so its in georgian Language. and maybe someone want to swich this news in other lagnuage... so if he/she clicks ENG or RUS he/she will be navigated to main INDEX.php page. because the URL of ENG and RUS buttons are index.php?lang_id=rus/eng so how can i make THE url of Swiching buttons to be random depending on what page i am on if i am on index.php?page=news&news_id=123 swiching button URL to change from index.php?lang=geo to index.php?page=news&news_id=123&lang_id=eng/rus/geo what language i am on. hope its clear what i mean. thanks a lot in adavance Link to comment https://forums.phpfreaks.com/topic/101855-url-how-to/ Share on other sites More sharing options...
ohdang888 Posted April 19, 2008 Share Posted April 19, 2008 i'm not understanding you clearly enough.... how could you have more than 1 language on a page? Link to comment https://forums.phpfreaks.com/topic/101855-url-how-to/#findComment-521282 Share on other sites More sharing options...
marcus Posted April 19, 2008 Share Posted April 19, 2008 When they click the new language you can use the HTTP_REFERRER to use a header redirection back to that page. Or set a cookie of the language they've clicked, you can do this with javascript if you'd like, then just check it by language. Link to comment https://forums.phpfreaks.com/topic/101855-url-how-to/#findComment-521284 Share on other sites More sharing options...
logicopinion Posted April 19, 2008 Author Share Posted April 19, 2008 Could you show me some javaScript Example ... or keywords to search for that Around? Link to comment https://forums.phpfreaks.com/topic/101855-url-how-to/#findComment-521347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.