Nic727 Posted December 11, 2015 Share Posted December 11, 2015 Hi, On my website, I have _f.html for french and _e.html for english. So I put a button and I would like that if the URL contain _f.html, it change it for _e.html. I need to know what I should put in my if () and after. Now I just put that if (){document.location="../anglais/"+the URL without _f.html+"_e.html"} Thank you to help! Link to comment Share on other sites More sharing options...
davej Posted December 14, 2015 Share Posted December 14, 2015 I would think that for language selection you would create a cookie. Then Php or Javascript would read the cookie and load the appropriate content. Link to comment Share on other sites More sharing options...
dsonesuk Posted December 14, 2015 Share Posted December 14, 2015 If you have '/anglais/' english folder, and i presume a french folder why not swap folders rather than renaming pages to using '_e.html' or '_f.html', they should link relative to pages within these folders so i dont see the need for cookies? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now