Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Help needed on language change

how can I add a folder in expression

1:35 am on Sep 12, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 4, 2011
posts: 73
votes: 0


I'd really like some help on this.

How can I add the server's root folder of "english" to this:

~ s/_e\.shtml/_f\.shtml/

This searches all occurences of _e.shtml and replaces them with _f.shtml (it being in the same folder).

Yet, in between that, I would like to add the server's root of "french" folder in there.

For examples; and yes I know it's not right:

~ s/_e\.shtml/(French-Folder)_f\.shtml/

I would really appreciate anyone's help on this one, as I can't seem to get it right, with what I know so far.

Thank you.
9:42 am on Sept 20, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
votes: 0

If I understand you correctly, your filecontent is something like

<a href="myfile_e.shtml">

and you want it to be
<a href="/french/myfile_f.shtml">

you need to include a way to match filenames. If, for example, you really are parsing links, you can use " as a marker.

should work in that case.

If I didn't understand you correctly, please elaborate on exactly how your input looks like and what you want the output to be.
Sorry for the long time it took to get an answer, it seems everyone missed your thread.
4:21 am on Sept 29, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 4, 2011
posts: 73
votes: 0

pretty much yes. And then vice-versa once they're in the English folder and they click on the link (.pl) it brings them to the French folder respectively. I'll give it a try and let you know if it will work switching from one language to the other. Thank you