1

how i can switch between site language without change current page . for example :

mydomain.com/en/support/default.aspx

when i click on Arabic link i want to change link to:

mydomain.com/ar/support/default.aspx

with the knowledge that i have a site in Arabic and in English the same site links. Thanks.

Haim Evgi
  • 123,187
  • 45
  • 217
  • 223
user554210
  • 11
  • 1

1 Answers1

0

EDIT First assign an id attribute to the link. using JQuery

$('#linkId').attr('href', $('#link').attr('href').replace('ar','en')) //or 'en','ar'

or to automatically toggle between ar and en:

link = $('#linkId');
if (link.attr('href').match('en') != null)
   link.attr('href',link.attr('href').replace('en','ar'));
else
   link.attr('href',link.attr('href').replace('ar','en'));
Amjad Masad
  • 4,035
  • 1
  • 21
  • 20