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
  • 120,002
  • 45
  • 212
  • 219
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
  • 3,985
  • 1
  • 19
  • 20