pwired Posted March 19, 2014 Posted March 19, 2014 Hi I have multi language working on a site that I am working on. mydomain.com/en/ mydomain.com/de/ mydomain.com/es/ If I have mydomain.com open in my browser and then in the browser address bar I type /de/ so there will be mydomain.com/de/ and hit enter it opens the german part perfectly. Same works for spanish with /es/ Doing so no new page opens in the browser. However if I put 3 language flags in the navbar and link each flag to it's language (for example german flag in the navbar linked to mydomain.com/de/) then the browser opens a new page and shows there the german text. same thing when clicking on the spanish language flag. So when I click on the german flag and then on the spanish flag, I have 2 new pages opened in my browser. How can I avoid this and stay in the first page with the default language, so when for example I click on the german flag no new page is opened in the browser.
diogo Posted March 19, 2014 Posted March 19, 2014 you don't have target="_blank" defined in your anchors?
pwired Posted March 19, 2014 Author Posted March 19, 2014 Yes I see target is blank there in the template this is the code i have : <div id="flags" style="float: right; position: relative;"> Select Language <a target="_blank" href="http://domain.org"> <img alt="flags" src="/site/templates/styles/images/english_flag.png"> </img> </a> <a target="_blank" href="http://domain.org/de"> <img alt="flags" src="/site/templates/styles/images/swiss_flag.png"> </img> </a> <a target="_blank" href="http://domain.org/es"> <img alt="flags" src="/site/templates/styles/images/spanish_flag.png"> </img> </a> </div><!-- @end #flags -->
pwired Posted March 19, 2014 Author Posted March 19, 2014 I don't understand, should there be target blank or just not ?
diogo Posted March 19, 2014 Posted March 19, 2014 Shouldn't be. With target blank the links will open on a new page(window). 1
Joss Posted March 19, 2014 Posted March 19, 2014 Target blank tells the browser to open a new tab/window Edit: Like wot Diogo said.
pwired Posted March 19, 2014 Author Posted March 19, 2014 yes, it's working now, thanks !! Clumsy me, sometimes the easiest html things can get me pulled. I have to admit that I copied and pasted the code from somewhere else into my template.
diogo Posted March 19, 2014 Posted March 19, 2014 No problem in pasting things from other places, but make sure you go through them before 1
pwired Posted March 19, 2014 Author Posted March 19, 2014 I am doing this 3 column responsive website and learned a lot. I will delete everything this week and start from scratch again with everything I learned.
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