WordPress.org

Ideas

Native Multilingual CMS Features, one more time

  1. Ihor Vorotnov
    Member

    12345

    It's been discussed many times and voted high. No significant changes since. Don't get me wrong, I love WordPress and make my living with it for many years. But when I start building large sites in multiple languages I start hating WordPress being oriented to only one language.

    I've heavily used these plugins - Polylang, WPML, qTranslate, tested all the rest. Each of them has good and bad sides. So here's the best of all words and how I see it.

    1. Add built-in kind-of-taxonomy language, which can be attached to any WP Object - post/page/CPT, taxonomy/CT, nav_menu etc. Make it the first part of URL: example.com/%language%/

    2. Add relations to connect any WP Object to another one as a translation (corresponding object in another language). The way it is done in Polylang is pretty nice.

    3. Make slugs for any WP Object NOT UNIQUE. WPML plugin allows to have pages and posts in different languages with translated titles and SAME slugs. But it can't do this with tags, categories and custom taxonomies. If we have a language super-taxonomy as a highest hierarchy level (first part of url) then we can differentiate between objects with same slugs. For all internal operations consider slug to be %language_code%-%slug%. This is UNIQUE. But the slug itself is not.

    4. Modify core functions to work with translations. For example, wp_insert_term() or wp_insert_post() should accept some extra args, like:


    $args = array
    'alias_of' => '',
    'description' => '',
    'parent' => '',
    );
    $terms = array(
    array(
    'language' => 'en',
    'name' => 'Example',
    'slug' => 'example', // Non-unique, or unique - for us to decide.
    ),
    array(
    'language' => 'de',
    'name' => 'Beispiel',
    'slug' => 'example', // Non-unique, or unique - for us to decide.
    ),
    array(
    'language' => 'ru',
    'name' => 'Пример',
    'slug' => 'example', // Non-unique, or unique - for us to decide.
    ),
    );
    wp_insert_terms( $terms, $taxonomy, $args );

    // OR, insert only one term at a time:

    $args = array(
    'slug' => '',
    'alias_of' => '',
    'translation_of' => '',
    'description' => '',
    'parent' => '',
    );
    wp_insert_term( $term, $taxonomy, $language, $args );

    This is not the complete list of changes, of course, but a good point to start from. It will make lives of all non-US developers and users much easier.

    Here's why it would be useful. Just one example of many use cases.

    Example: Let's pretend we have a site in 2 languages - English, and Russian. And we have a countries custom taxonomy. Russian names are transliterated to latin characters.

    example.com/country/russia
    example.com/country/rossiya

    It's possible to achieve right now, because term slugs are different. But what about Laos (and many other countries as well)? Transliteration will be exactly the same.

    example.com/country/laos
    example.com/country/laos

    Houston, we have a problem! But if we add and parse the language code in front of our url, we will get:

    example.com/en/country/laos
    example.com/ru/country/laos

    Now this allows us possible to filter posts in one language for the given country. But term slug must be NOT unique.

    I hope you get the idea.

    Posted: 2 years ago #
  2. It would be really nice! WordPress needs to be a modern CMS with multilingual support in core.

    Posted: 2 years ago #
  3. Yes then it will be awesome by the way can you help me in one issue all just go to responsive theme support forums and see my thread within the first page and help me out please

    Posted: 2 years ago #
  4. MRA_Andy
    Member

    12345

    This is needed for WordPress!
    Multi-language is an important feature. I don´t have the time and I don´t feel like running a multisite setup with different languages. Plugins are difficult, sometimes not consistent and a core ability would be really appreciated.
    My special problem is, as I said, a full mutlisite setup with different languages is too much work. However, sometimes an article is important to me, so I like the idea of having an english translation as well. Today the only possibility is to have one article with the text stored in both languages next to each other or to post that article multiple times, each time with a different language.
    Both possibilities are not the way to go for me and as I only translate a few articles, multisite isn´t either.

    Posted: 2 years ago #
  5. ChrisFo
    Inactive

    12345

    I'm no dev, but this seem to be reasonable modifications to the core to allow better ML support/plugins.

    Posted: 2 years ago #
  6. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    As a dev, it is that complicated to back port without data loss.

    We're having enough trouble just making terms non unique without crashing larger sites when we upgrade, so changing post content to arrays is monumental and unlikely.

    Posted: 2 years ago #
  7. Etienne Dupuis
    Member

    12345

    This should definitely be included in wordpress. Native multilingual is a must.

    Posted: 1 year ago #
  8. holzspalter
    Member

    Wow! Thanks alot!

    Posted: 1 year ago #
  9. snurkexpert
    Member

    12345

    This would be a great feature indeed, yes. Is there any status on it? Posted to WordPress core trac?

    Posted: 1 year ago #
  10. Ihor Vorotnov
    Member

    12345

    @snurkexpert The idea is under consideration, which actually means nothing :) But the Core team is aware of the problem we have, and there's some work being done to (probably) make it happen in the future, first of all - check the Taxonomy Roadmap. Additionally, making slugs non-unique is a large task which will break backwards compatibility, which isn't "WordPress-way of doing things". Permalinks, as they are currently implemented, rely on slugs, which isn't good but that's what we have to deal with.

    TL;DR - it's not going to happen anytime soon. But we're making some progress, at a slow pace. And some recent (and upcoming) architecture changes will make working with multiple languages easier through different plugins - WPML, Polylang etc.

    Posted: 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    80 Votes
  • Status

    This idea is under consideration