• Hi guys,

    I’ve searched the support forum for solution but I can’t find any info on the topic, only 1 unanswered closed ticket.

    I am building a plugin that allows renaming taxonomies labels. I would like to make it Polylang/WPML compatible, so I’ve used a wpml-config.xml file for this matter.

    The plugin stores (only) changed taxonomy labels in an option, let’s call it plugin_serialized_array (under the key of taxonomies, which contains array of lables for each customized taxonomy). Note that as this array contains only customized labels, it is dynamic one, so there are no predefined keys. That’s why I’m currently using a wildcard for the option setup in wpml-config.xml file, which works fine with WPML plugin, but not with Polylang. Polylang doesn’t seems to parse wildcard setup.

    Here is wpml-config.xml file content that works with WPML only:

    <wpml-config>
      <admin-texts>
        <key name="plugin_serialized_array">
          <key name="*" />
        </key>
      </admin-texts>
    </wpml-config>
    

    Here is what is working with Polylang, though:

    <wpml-config>
      <admin-texts>
        <key name="plugin_serialized_array">
          <key name="taxonomies">
            <key name="category">
              <key name="name" />
            </key>
          </key>
        </key>
      </admin-texts>
    </wpml-config>
    

    As you can see, for Polylang to work I would need to register all taxonomies and taxonomy label keys, which is not possible as I can’t predict what custom taxonomies are registered on the website and so on… You get the idea.

    My question is whether it is planned to add a wildcard support for wpml-config.xml file or whether should I use some other method to make my plugin work with Polylang. Can I register this dynamic plugin option with Polylang using some other method?

    Or maybe would it work if I generate the wpml-config.xml file dynamically by my plugin in WP uploads folder and then hook the file’s path/URL to Polylang to process somehow? This is kind of more complicated, though…

    Thanks for the answer in advance! Keep up good work!

    Regards,

    Oliver

    https://wordpress.org/plugins/polylang/

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

The topic ‘Wildcard in wpml-config.xml file’ is closed to new replies.