Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    I’m not sure I follow what you’re asking.

    Thread Starter mrupal

    (@mrupal)

    I mean this:

    the site has 2+ languages: if I am to choose a related post through a related field I should get only posts in the current language.

    Exactly that is not the case. I get the posts in all languages.

    To be more precise: Let’s say the site is currently in English: For some reason I want to relate to the “About” page. If that About page exists in several languages I get all its versions (the English but also the German one and so on.) as options to choose. I definitely should be getting only the version in the current language.

    Plugin Contributor fireproofsocks

    (@fireproofsocks)

    I think this is a limitation of how WP is performing the translations: if there is no field to filter on, then you can’t do a database query to zero in on one language or another. I’m not sure if that’s the case with WPML, but I’ve seen some translation plugins that rely on event hooks to perform the translations instead of having separate rows in the database to distinguish between translations. In that case, the problem is with the translation plugin: there’s nothing anyone can do to filter that because all the translations exist in one place.

    If the plugin is setting a custom field to identify the language of a page, then you can set your search criteria for it like any other field in a relation: the search criteria are very flexible. Look at the wiki for examples.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Relation fields don't support WPML’ is closed to new replies.