WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Bug: tags and category should not require unecessary translations (10 posts)

  1. Jehan
    Member
    Posted 1 year ago #

    Hi,

    polylang forces us to translate tags and categories as well.
    While this is not a bad feature, and I fully understand it for some tags/categories, it should accept a tag to be "generic" (across all languages) by default, and we could make it "one lang only" if we really need to after.

    Indeed sometimes, some word would be the same in several language. Or else it is a proper name (like a software or someone's name for instance). Or any other reason which would make the tag being the same.

    Here my problem is even more annoying because I created some tag for a post in one lang, and realize I cannot use it in the translation of this post (when I do so, it looks like it work, but a refresh shows me it doesn't). And if I try to create the "translation" with the same name, it refuses, telling me the tag exists.

    Would be great to fix this for a next version.
    Thanks!

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    You can have tags with same names but you can't have tags with same slugs. So, just change the slug in the translation it should work.

    This is not a bug or specific to Polylang. Just how WordPress works.

  3. Jehan
    Member
    Posted 1 year ago #

    Hi,

    I see. Just tested, it works. Thanks.

    I still think that's far from ideal. Categories don't evolve very fast, but tags have the tendency to evolve much more.

    If we have like 3 or 4 languages, for each tag, we have to duplicate them in a counter-intuitive way in WordPress tag editor (because as we cannot use the same slug as the original tag, we cannot create the duplicate tags from the post edition page), that's pretty laborious.

    I would really suggest to make both tags and categories as being generic across all langs, still giving possibility to create a translation afterwards, but not forcing it from the start.
    Thanks anyway for the answer.

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    I would have believe that it's quite rare that words have the same spelling in different languages.

    What do you expect ? That Polylang creates itself a different slug for different languages? For example:
    Tag (in English) -> tag
    Tag (in French) -> tag-fr

  5. mokona84
    Member
    Posted 1 year ago #

    Why not? Proper names, for example, are always the same. I have a lot of categories/tag which share the same name.
    Automatic slug creation would be a nice feature, if it's not too hard to do.

  6. Jehan
    Member
    Posted 1 year ago #

    Chouby: as Mokona84 says, yes first of all, proper names will normally always be the same.
    In my last blog post, for instance, I was speaking about some software programs. So I tagged the post with their names. And they are the same, whatever languages.

    And now even common names, there are a lot of cases where they are the same across languages. For instance because they are recent and come from English. As the perfect example, in French, we would translate "tag"... by using the English word "tag".

    So yeah a solution could be as you propose: automatically creating translation tags and categories (and if in some cases, they are the same, well we can modify them).

    But I think a better solution is that a tag is language-free by default. Then if the user wishes to specialize it to a lang and make some translation, one can do it afterwards.
    Why I think it is better design: first it avoids useless duplication of tags; second in case of translated tags, we don't need to go in the tag edition page immediately (we can just create the new tag in the normal post edition page, and later associate it to its translation if desired). In other word, a much cleaner and easier-to-use design.

  7. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    How to choose the tag archive language if there is no language associated to the tag? Should I mix all posts in all languages ? Quite ugly... Or display a content based on user preferred language ? Probably quite bad for SEO and finally, I would rewrite a plugin which already exist and did not satisfy me.

    It is always the same problem. What is better for some users is worse for others. I had the same issue when I introduced the media translation. Some users were happy. Some others were not. I can't satisfy everybody.

    I will look at the solution I proposed (automatic slug creation, different for each language) to see if it is easy to do.

  8. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    If you are interested, you can try the development version (0.9.4.4)
    http://wordpress.org/extend/plugins/polylang/

    It implements the automatic slug creation, different for each language.

  9. alonsofedz
    Member
    Posted 1 year ago #

    I still think there should be an option somewhere to disable the 'translation' of default taxonomies (categories and tags)... or a way to specify that a taxonomy is translationless or it applies to all languages.

    Is there currently a way to prevent this behaviour?

  10. Chouby
    Member
    Plugin Author

    Posted 12 months ago #

    This may be programaticaly achievable. However I never tested it. So it may work or not. Try adding this in your functions.php or in a custom plugin.

    add_filter('pll_get_taxonomies', 'remove_taxonomies');
    function remove_taxonomies($taxonomies) {
      unset($taxonomies['category'], $taxonomies['post_tag']);
      return $taxonomies;
    }

    More information on the filter used: http://polylang.wordpress.com/documentation/documentation-for-developers/filter-reference/#pll_get_taxonomies

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic