Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check if another language is available and hide if not #352

Open
social-ink opened this issue Feb 17, 2016 · 3 comments
Open

How to check if another language is available and hide if not #352

social-ink opened this issue Feb 17, 2016 · 3 comments

Comments

@social-ink
Copy link

We have a site with two languages. We want the language switcher at the top, but ONLY if the current page is available in another language. If not, we want to hide the whole switcher. I am currently calling the switcher nav through PHP, but how do I first check if the_content is available in another language?
Thanks!

@essensx
Copy link

essensx commented Feb 17, 2016

You can use #329

As qTranslateX does not support this out of the box.

Note: Update/Publish your pages, posts, after integrating this change in order for this to work.

@social-ink
Copy link
Author

Thanks, exactly what I was looking for! You saved me the time to write it ourselves :-)

If I pull just your commit, will it get overwritten by the next plugin update however, or is it now going to be in core?

@essensx
Copy link

essensx commented Feb 17, 2016

I created a MR long ago, but it seems the creator did not merge anything for months now. So, if it's eventually added to the core, you should have no problems updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants