www.webdeveloper.com
Results 1 to 3 of 3

Thread: Change current URL to switch language: From /ch/ to /en/ and vice versa

  1. #1
    Join Date
    Nov 2011
    Posts
    12

    Change current URL to switch language: From /ch/ to /en/ and vice versa

    Hi I have text links on top-right of every html page that switch to another language of the current page. How do I use javascript or jquery to switch languages without editing every page?

    currently my links look like below:
    <li id="EngToChi"><a href="/account/en/page1.html"><img src="/images/account/buttons/english.jpg" alt="English" width="36" height="13" align="top" /></a></li>

    I want <a href="/account/en/page1.html"> to use javascript instead:

    <a href="dynamically use current url and change from /ch/ to /en/ and vice versa">

  2. #2
    Join Date
    Feb 2014
    Location
    Managua, Nicaragua
    Posts
    45
    Only with jQuery i think is imposible to do, u have to work with jQuery + PHP or some language server-side...

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,344
    Ask in the JavaScript frameworks forum...
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles