Not fully compatible with WPML setting "Languages in directories"

Home Forums Calendar Products Events Calendar PRO Not fully compatible with WPML setting "Languages in directories"

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1106659
    Henrik
    Participant

    The WPML setting “Language URL format” has a value called “Different languages in directories” that instead of uses the format http://www.example.com/?lang=en, uses http://www.example.com/en/

    The events calendar does not seem to be fully compatible with this setting. This causes the function call “get_permalink” to sometimes return http://www.example.com/en/?lang=en
    This is most notable when editing a custom post type in the backend, where the permalink is clearly visible.
    This issue also appears in search results URLs.

    The problem is located in The events calendars Rewrite.php file in the function “filter_post_type_link” that is attached to the filter “post_type_link”

    It happens because the search results page and the backend always uses the “?lang=” format (WPML design decision I assume), but this does not mean the the links on these pages should use this format. And therefore the if-statement “if( empty( $_GET[‘lang’] ) )” is not a valid way to determine if a link needs to have the lang attribute.

    I can not provide a better solution because I do not understand the purpose of the function since normally WPML should handle this by it self. However if this is related to some events calendar post types, the function should restrict it’s use to those. Or the check “if( empty( $_GET[‘lang’] ) )” should instead access the WPML “Language URL format” option directly.

    #1106663
    George
    Participant

    Hey Henrik,

    Thank you for reaching out.

    This and many other features of WPML are unfortunately not fully supported at this time. WPML does many non-standard, idiosyncratic things, and so our code simply is not fully supportive of all of its features at this time.

    Our primary commitment is for full compatibility with WordPress Core, and for all WordPress Coding Standards-compliant themes and plugins. WPML is not one of these plugins; it’s a great tool though, so we are working on better compatibility, but it could unfortunately take several months before any progress is made on that front in a way that would include the specific issues you mention here.

    Sorry to disappoint! I just wanted to be honest and clear about the nature of things.

    Sincerely,
    George

    #1112751
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Not fully compatible with WPML setting "Languages in directories"’ is closed to new replies.