![]() |
Need code, auto change site's language
I'm using vB 4.0.5 CMS, and site is in 2 languages. I have articles in Croatian and English. I would like vBulletin change the system language depending on what content a user is reading. So, when a user is reading our company info in english, I want "read more..." link in english, but when local user is reading a company info in croatian, I need the same link "read more..." to be in croatian.
So far, I have idea to stick each language to a CMS layout, something like "if layout=1 then langid=1 else langid=2...) but I'm not programmer. I don't know how to do this. Is it possible? Could I do this with sections, maybe? Becouse all my english content belong to one section, and croatian to another. If I could define default language for a section (I know it's impossible without programming), than my problem is solved. |
Hello Nikola, I'm not sure if that really is a good idea. Example: EN speaking User cannot read CR has EN language option in their User Settings. Goes to CR language page and loses EN language for orientation and gets lost. Conversely, CR speaking User cannot read EN has CR language options in their User Settings. Lands on an EN page and loses CR language for orientation and gets lost.
Your idea only works for bilingual Users and not monolingual Users. But bilingual Users can do fine in either language so it really isnt a problem. Oh wait, your idea is helpful for Guests who have no language settings. That means your condition should include "if guest...". Alternatively, make a flag icon on the CMS template to switch languages easily. |
Quote:
|
Here is our site:
www.hora-elektronik.hr As you see, it has 2 flags in the header, each of them is changing both language and section. So, how to make that better? How would a code that changes language depending on layout look like? |
All times are GMT. The time now is 12:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|