• Resolved commvill

    (@commvill)


    Hello David,
    we have created a wiki in our site. Everything is perfect when we select Italian, which is the default language of the site. When we switch to English we see the translated wiki page correctly displayed, but the TOC remains in Italian. Is there a way to automatically show the English TOC we have previously translated instead of the Italian one? We are using WPML.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dmccan

    (@dmccan)

    I’ll take a look.

    Plugin Author dmccan

    (@dmccan)

    Hi @commvill,

    I spent a couple of hours looking at this and here is what I found:

    Yada Wiki gets the TOC content by calling the WordPress function get_page_by_title(). WPML doesn’t translate that automatically, but you can do so with some code. Here is a WPML support ticket that mentions it:

    https://wpml.org/forums/topic/getting-translations-of-get_page_by_title-output/

    I don’t quickly see a way to safely add code for this to the main plugin.

    It is possible that instead of using the TOC functionality that you could create another page (not named TOC) and use a plugin like Insert Pages for similar functionality. It looks like Insert Pages supports WPML. It might be worth a try.

    https://www.ads-software.com/plugins/insert-pages/

    Best regards,

    David

    Thread Starter commvill

    (@commvill)

    Hello David,
    first of all, thank you very much for your precious support. You have spent some of your time resolving our issue and we are grateful for that.

    We have followed the second procedure you suggested and it worked.

    Specifically, we have installed Insert Pages and have configured it this way:
    Shortcode format: Use page IDs
    Insert method: Use normal method

    In each wiki page with the original text, we have inserted the shortcode:
    [insert page=’original language TOC’s page ID‘ display=’content’]

    In each wiki page with the translated text:
    [insert page=’translated TOC’s page ID‘ display=’content’]

    When the user changes the site language, WPML will automatically find the translated page where the shortcode gets the TOC’s content in the requested language.

    Plugin Author dmccan

    (@dmccan)

    Hi @commvill – Thank you very much for sharing the solution in case it could help others.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TOC translation in multilanguage qith WPML’ is closed to new replies.