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
herrvigg opened this issue Jun 23, 2018 · 3 comments
Open

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

herrvigg opened this issue Jun 23, 2018 · 3 comments
Labels
legacy issue Legacy issue imported from original repo

Comments

@herrvigg
Copy link
Collaborator

Issue by social-ink
Wednesday Feb 17, 2016 at 18:15 GMT
Originally opened as qTranslate-Team/qtranslate-x#352


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!

@herrvigg herrvigg added the legacy issue Legacy issue imported from original repo label Jun 23, 2018
@herrvigg
Copy link
Collaborator Author

Comment by essensx
Wednesday Feb 17, 2016 at 18:18 GMT


You can use qTranslate-Team/qtranslate-x#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.

@herrvigg
Copy link
Collaborator Author

Comment by social-ink
Wednesday Feb 17, 2016 at 18:28 GMT


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?

@herrvigg
Copy link
Collaborator Author

Comment by essensx
Wednesday Feb 17, 2016 at 18:42 GMT


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
legacy issue Legacy issue imported from original repo
Projects
None yet
Development

No branches or pull requests

1 participant