PHP to get translated string & post content ?
-
Hi,
I have seen your code to get the URL of a translated page (and works fine, thanks). But what are the PHP codes to:
- get the translation of any string from the defined source language ? anything like mystring = translate_function(“this string”, into_that_language); ? (ideally, it would either pull it from already translated strings, or dynamically translate it if credits are available -if only doing partially, or other way, please still tell-)
- get the translation of the full page content ? (either already translated, or in the current state that it would be shown). I am sure the current translated state must be stored somewhere, in a field or elsewhere to be displayed fast on the frontend. My idea for this is to try to get around the TranslatePress limitation that the translated content is not searchable in the WP search feature -very annoying-, so I would give that content somehow to the search plugin I am using to force its indexing & appearing in search results. So what is your equivalent to get_the_content() function ? (with shortcodes rendered and translated ideally) ?
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.