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

Question: About qtranxf_use_language() #87

Closed
herrvigg opened this issue Jun 21, 2018 · 4 comments
Closed

Question: About qtranxf_use_language() #87

herrvigg opened this issue Jun 21, 2018 · 4 comments
Labels
legacy issue Legacy issue imported from original repo need info The submitter must provide more info

Comments

@herrvigg
Copy link
Collaborator

Issue by resting
Thursday Mar 19, 2015 at 08:12 GMT
Originally opened as qTranslate-Team/qtranslate-x#87


I'm curious why the $show_available option is set to true for this line?

case 'post_content': $post->$key = qtranxf_use_language($lang, $txt, true); break;

Was trying to get WP to display the content under the default language if the one requested is empty. But it doesn't, and shows a line of message instead. I think it means to say that only English is available or something.

Anyway, I found that that's because $show_available is true, hence this expression isn't true.

Setting $show_available to false works, but I'm not sure about the implications.

@herrvigg
Copy link
Collaborator Author

Comment by johnclause
Thursday Mar 19, 2015 at 15:16 GMT


Please, describe the original problem which you need to solve with the steps how to reproduce.

@herrvigg herrvigg added legacy issue Legacy issue imported from original repo need info The submitter must provide more info labels Jun 21, 2018
@herrvigg
Copy link
Collaborator Author

Comment by resting
Friday Mar 20, 2015 at 02:14 GMT


There are some contents that I want to display in the default language while leaving the others blank. In my case, I only want to enter content in English, but leave Chinese, and Japanese tabs blank.

But WP doesn't render the default language's content, when I view in Chinese or Japanese.

Looked into the code and found the findings I stated in my first post.
Alternatively without looking into the code, is there anyway I can make WP render the English content, when viewed both in Chinese or Japanese (but leave the content area for these 2 languages blank in the backend)?

@herrvigg
Copy link
Collaborator Author

Comment by johnclause
Friday Apr 03, 2015 at 20:16 GMT


Did you try using option 'Hide Untranslated Content', which, btw, was modified in the latest version on github. Would that solve what you need?

@herrvigg
Copy link
Collaborator Author

Comment by johnclause
Tuesday Apr 07, 2015 at 17:12 GMT


Alternatively without looking into the code, is there anyway I can make WP render the English content, when viewed both in Chinese or Japanese (but leave the content area for these 2 languages blank in the backend)?

Is this the same issue: qTranslate-Team/qtranslate-x#21?
If so, it is implemented in the latest at github, for example, https://github.com/qTranslate-Team/qtranslate-x/archive/3.2.9.8.3.zip. Please, test it.

I am closing this issue for now, we can still write into a closed issue, or we can re-open it, if needed.

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 need info The submitter must provide more info
Projects
None yet
Development

No branches or pull requests

1 participant