Title: Translate TOC
Last modified: July 10, 2021

---

# Translate TOC

 *  Resolved [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/)
 * Hi
 * I am using Better Docs free version and now I am translating my website using
   Falang.
 * Falang is a very modern translation plugin and uses the **entity method**. It
   means that NO new document is created for the translation, as is usually the 
   case, for example with polylang.
 * Now I see that TOC is not translated. I have no way in Falang to translate the
   entries into TOC, so I suspect that TOC is created in runtime and is NOT a stored
   item. Obviously Better Docs always takes the entries for TOC from the base page,
   in my case the English one.
 * How can I modify Better Docs’ code to use Falang’s translation to create TOC?
   I have very little programming knowledge, but with good guidance I can change
   a php or css file.
 * In the example page you can see a spanish translation of a document, but with
   english TOC. Click on the US flag in the sidebar and you will see the basic English
   version. Only this document exists for this title. The translation is linked 
   to this document and is not his own document. This is the entity method.
 * Many thanks for the help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftranslate-toc%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14647203)
 * Some more information about entity method:
 * Entity Translation is the newer method
    Content Translation is the older method
 * The Entity Translation allows entities (such as nodes) to be translated into 
   different languages. Entity Translation provides field-level translation, so 
   that site builders can select which fields should be translatable.
 * Sometimes it is also called field translation.
 * No copy of the page is created and then translated, but the individual parts 
   of the page are converted into entities (fields) and translated individually.
   Each entity (field) then has several translations, depending on the number of
   languages. If the basic page is called up, the content of the entities (fields)
   is replaced according to the language set.
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14647531)
 * Some first information from Falang:
 * Falang store the translation in the meta of each post
    exept for the builder 
   page (dive, elemtor, wpbakery and soon yootheme)
 *  Plugin Support [Abid Hasan](https://wordpress.org/support/users/abidhasan112/)
 * (@abidhasan112)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14647693)
 * Hi [@linuc](https://wordpress.org/support/users/linuc/) ,
 * Hope you’re doing good.
    **BetterDocs** currently not support the **Falang** 
   plugin for multilingual solution fully.
 * I would recommend you to use the popular translation plugins (ie. **WPML** ) 
   to translate your BetterDocs articles along with TOC.
 * If we get more such requests in the future for the **Falang** plugin integration,
   we will definitely work on it in our plugin in the future.
 * Thank you!
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14648410)
 * [@abid](https://wordpress.org/support/users/abid/) Hasan
 * Thanks for letting me know!
 * I can’t use WPML as I don’t have the money to pay for it. And I couldn’t find
   a free plugin with entity translation, except for Falang.
 * So I’ll have to live with the situation until you integrate Falang. At the top
   right of my page there is also a language switcher for Gtranslate automatic translation
   in case someone absolutely needs to see the TOC in their language. It’s just 
   a few words.
 * Please let me know when Falang is completely working with Better Docs. I think
   it’s just TOC, everything else seems to be working fine.
 * have a nice sunday
    Patrick
    -  This reply was modified 4 years, 9 months ago by [LinuC](https://wordpress.org/support/users/linuc/).
 *  [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14648425)
 * Hi,
 * i will see if i can find a solution and post it in this thread.
 * Best regards,
    Stéphane Falang Team
 *  Plugin Support [Abid Hasan](https://wordpress.org/support/users/abidhasan112/)
 * (@abidhasan112)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14650487)
 * Hi [@linuc](https://wordpress.org/support/users/linuc/) ,
 * I understand!
    You can also try to translate with **TranslatePress** plugin: 
   [https://wordpress.org/plugins/translatepress-multilingual/](https://wordpress.org/plugins/translatepress-multilingual/)
 * We used TranslatePress on our website aswell.
 * I can’t give you any ETA right now when we will work to make BetterDocs fully
   compatible with **Falang** plugin. If we get more requests in the future we will
   work on it don’t worry.
 * Thank you!
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/translate-toc/#post-14651310)
 * [@abidhasan112](https://wordpress.org/support/users/abidhasan112/)
 * I am working with Falang, because it is done by an experienced man. I am not 
   interested in any other translation plugin.
 * I hope Better Docs can solve this little problem soon.
 * greetings
    Patrick
 *  [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/translate-toc/#post-14679324)
 * Hi,
 * This can work with a little change in the BetterDocs plugin.
 * in the file
    wp-content/plugins/betterdocs/public/betterdocs-shortcodes.php line
   880 change $get_post = get_post($get_args[‘post_id’]); $post_content = $get_post-
   >post_content; to $post_content = apply_filters(‘the_content’, get_the_content());
 * it will work in the same way because the $get_args[‘post_id’] is get with get_the_ID()
 * Best regards,
    Stéphane Falang Team
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/translate-toc/#post-14686000)
 * [@sbouey](https://wordpress.org/support/users/sbouey/)
 * Thank you so much Stéphane!
 * I put it in betterdocs-shortcodes.php like this:
 *     ```
       880/*  $get_post = get_post($get_args[‘post_id’]);
        881    $post_content = $get_post->post_content;  inactiv LinuC */
        882   
        883    $post_content = apply_filters('the_content', get_the_content()); /* Code Falang */
       ```
   
 * This way you still have the original code and the correction of Falang is marked.
 * **It is important** to note that Falang’s code has the correct quotation marks
   before and after **the_content**. Italic doesn’t work!It must be “straight” quotation
   marks. See the difference to Stéphane’s post, please.
 * And don’t forget to turn off Better Docs auto update so that the correction isn’t
   overwritten unnoticed. As soon as Better Docs sends an update, run it and then
   check the translation of TOC. If it no longer works, you have to repeat the correction
   in betterdocs-shortcodes.php. So please keep the Falang code including the line
   numbers.
 * Apparently the correction of betterdocs-shortcodes.php doesn’t always work. WordPress
   plugin editor reports an error. So you have to download betterdocs-shortcodes.
   php and change locally, then upload again to the server. Or make the correction
   directly on the server with the editing function of the editor of the host server.
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/translate-toc/#post-14725076)
 * Hi
 * There was a update from Better Docs. But the change for Falang was not yet part
   of it.
 * If you use Falang and if you need the translated TOC, please follow the instruction
   in the last post. Just the line numbes have changed. It is now in line 893 and
   894.
 * Thanks!
    -  This reply was modified 4 years, 8 months ago by [LinuC](https://wordpress.org/support/users/linuc/).
 *  Thread Starter [LinuC](https://wordpress.org/support/users/linuc/)
 * (@linuc)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/translate-toc/#post-14992477)
 * [@abidhasan112](https://wordpress.org/support/users/abidhasan112/)
 * Hi
 * After a few updates from Better Docs, the falang code has unfortunately not yet
   been implemented. It would be great if you could do that 🙂
 * signature moderated:
 * [https://wordpress.org/support/guidelines/#do-not-spam](https://wordpress.org/support/guidelines/#do-not-spam)
    -  This reply was modified 4 years, 5 months ago by [LinuC](https://wordpress.org/support/users/linuc/).
    -  This reply was modified 4 years, 5 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Translate TOC’ is closed to new replies.

 * ![](https://ps.w.org/betterdocs/assets/icon-256x256.png?rev=2953105)
 * [BetterDocs – Knowledge Base Docs & FAQ Solution for Elementor & Block Editor](https://wordpress.org/plugins/betterdocs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/betterdocs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/betterdocs/)
 * [Active Topics](https://wordpress.org/support/plugin/betterdocs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/betterdocs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/betterdocs/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [LinuC](https://wordpress.org/support/users/linuc/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/translate-toc/#post-14992477)
 * Status: resolved