• Hey there,

    I’m having a lot of success and great results using the More-Lang plugin.

    However, I notice that when I create a button that is with a href link, it does not append the ‘?lang=[locale-code]’ query string to the URL links of buttons or button blocks.

    Is there a way to resolve this issue, or maybe I’ve missed something in the configurations or general use. Thank you.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello kibblewhite,
    Glad to know that More-Lang is useful to you.
    A URL must be filtered to get language added by More-Lang, some URLs are automatically filtered, but if a URL is added manually or by a third-party plugin, it is probably not filtered. You can try to filter the URL by coding, like the following:
    $the_url = apply_filters('post_link', $the_url);
    Then use $the_url.
    Regards!

    Hi clive,
    I’m having the same problem, where should I use the script you’re suggesting?

    Thank you

    Hi,
    The place for the script depends on the scenario, I have no idea if I don’t know the scenario.
    I will add a shortcode for this issue in the next More-Lang release(should be in one week), after that, the shortcode can be used to add the URL languages(but it needs to be used in some place where shortcodes are processed, e.g, the Content of the Post editor), something like this:
    [morelang-url-addlang]https://example.com/abcde[/morelang-url-addlang]

    In my case the URLs are not filtered when inserted through the page builder image component. I have inserted an image that links to a specific products category and the URL always take to the default language. I hope that field can process shortcodes even if I doubt it, I might be using an HTML/Script component instead. Do you think the shortcode would work where an URL is not filtered?

    Anyway it’s great to se a solution for this, I can’t wait for it.

    Thank you

    Hi artemis21,
    I’m not sure if that can process shortcodes, if it doesn’t allow you to edit the URL, the shortcode should not work. And the WooCommerce’s products category Blocks work well with More-Lang.
    And in the next release of More-Lang, a new section will be added to “More-Lang Compatibility with Plugins & Themes in some Special Cases”, it allows the users to enter links to be filtered (but how to find the right links is not easy for non-developers, even in some cases the third-party plugins don’t provide the related filter support, so it’s not useful for everyone).
    Regards!

    Hi kibblewhite,
    Is your scenario easy for me to reproduce? If it’s easy, I can check it in my Env. to figure out the right solution.
    Regards!

    In the latest More-Lang release, a new section “Link filters for adding language” was added to the “More-Lang Compatibility with Plugins & Themes in some Special Cases”, the users can input the links expected to be filtered; and a shortcode was added for adding language to a URL, its usage:
    [morelang-url-addlang]/example/[/morelang-url-addlang] or
    [morelang-url-addlang fullpath]https://www.example.com/example/[/morelang-url-addlang]
    Missing language in Links can be tricky, maybe both of the above solutions are useless in some scenarios, and if a third-party plugin doesn’t filter its links, maybe there’s no viable solution at all.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Buttons & Button links not behaving as expected’ is closed to new replies.