changed the way lang code was removed from url

When the language code was part of the url (i.e. http://myserver.com/en/page--en/view) the 'en/' part got removed in all its occurrences. The url thus became http://myserver.com/en/page--view. Ive used regexp to make sure replacement only takes place at the beginning of the string and no more then once.