Page 1 of 1

Check if laguage is available

Posted: Fri Jul 04, 2008 7:29 pm
by flow24
Hi good people!

Is it possible to check (in a template), if content in a given language is available?

What I'm trying do:
I have laguage switch flags at the top of my page. But for some pages there is no translation available. So I want to check if the translation is available and if not, hide the according flag.

Why I'm trying to do this:
Of course you can hide empty menu items (for example with alby's tip from his "HowTo-Thread"). But when you are on a page and you switch the laguage, and the translation does not exist, you'll end up with an empty page. And I would like to avoid that, by disableling the flag, if the translation does not exist.

So does someone have a clue how to get this done? Thanks a lot for you help! :D

Re: Check if laguage is available

Posted: Fri Jul 11, 2008 7:57 pm
by alby
flow24 wrote: Is it possible to check (in a template), if content in a given language is available?

What I'm trying do:
I have laguage switch flags at the top of my page. But for some pages there is no translation available. So I want to check if the translation is available and if not, hide the according flag.

Why I'm trying to do this:
Of course you can hide empty menu items (for example with alby's tip from his "HowTo-Thread"). But when you are on a page and you switch the laguage, and the translation does not exist, you'll end up with an empty page. And I would like to avoid that, by disableling the flag, if the translation does not exist.

So does someone have a clue how to get this done? Thanks a lot for you help! :D
There is but I don't like this.
For information

Alby

Re: Check if laguage is available

Posted: Fri Aug 01, 2008 1:58 pm
by flow24
Sorry I did not see you answer. This is exactly what I was looking for. It's really not very pretty, but it appears to be working...

Anyhow, I just wanted to say THANK YOU!  :)