dcsimg
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,591
    Ask in the JavaScript frameworks forum...
    If your post falls off the page, bump it. ...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

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