• Resolved neuhaus3000

    (@neuhaus3000)


    Hello,

    How can I add the SEO setting in an other language?
    I don’t have the possibility with WPML… Hummmm…

    Thanks!

    neuhaus3000

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi neuhaus3000,

    You can use shortcodes in the options to set various translated strings.
    Please do note that when using shortcodes, the character counters for the titles and descriptions then will not represent the true output.

    First, you’d need to turn these two filters on to allow shortcodes in the titles and descriptions:

    add_filter( 'the_seo_framework_do_shortcodes_in_description', '__return_true' );
    add_filter( 'the_seo_framework_do_shortcodes_in_title', '__return_true' );
    

    You should place the code above within your theme’s functions.php file. If you’re not caught up with filters yet, please read this small tutorial.

    And you need either of these two plugins:
    1. WPML Translate Shortcode
    2. WPML Shortcodes

    With plugin 1, you can use the following code:
    [wpml_translate lang='en']My Title[/wpml_translate][wpml_translate lang='nl']Mijn Titel[/wpml_translate]

    With plugin 2, you can use this:
    [wpml_if lang='en']My Title[/wpml_if][wpml_if lang='nl']Mijn Titel[/wpml_if]

    Please note that I have not tested this myself yet. Assuming the plugins are correctly written, it should work.

    Best of luck! Cheers 🙂

    Thread Starter neuhaus3000

    (@neuhaus3000)

    Hey Sybre,

    I will try this, thank you!

    neuhaus3000

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

The topic ‘Translation?’ is closed to new replies.