Check if laguage is available

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
flow24
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 22, 2008 2:46 pm

Check if laguage is available

Post 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
Last edited by flow24 on Wed Jul 09, 2008 12:47 pm, edited 1 time in total.
alby

Re: Check if laguage is available

Post 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
flow24
Forum Members
Forum Members
Posts: 28
Joined: Tue Apr 22, 2008 2:46 pm

Re: Check if laguage is available

Post 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!  :)
Locked

Return to “[locked] CMSMS MLE fork”