Supporting content in a Language Family vs. specific languages

Events happening in the community are now at Drupal community events on www.drupal.org.
shawn_smiley's picture

We just had an interesting request from a client that got me thinking in a broader sense about the nature of Internationalization and Localization. I'd love to hear feedback from the group on this concept and see if there is already some work in progress on this that I can join.

I've already performed a search of the active projects and sandboxes on drupal.org. I've also reviewed the very nice writeup of the multi-lingual initiative at http://hojtsy.hu/d8mi, but didn't see anything specifically related to this.

Use case
First off, let's talk about a specific use case and the more general challenge.

Say we have a site with the languages US English, UK English, Spanish, German, French and Italian. Let's focus on just the US English and UK English sites. Most, say 75%, of the content on these two sites will be exactly the same but with specific items that need to be localized for either US or UK depending on the site.

So more generally, the question is how to avoid unnecessarily duplicating content across multiple sites that share a common base language while maintaining the ability to provide translations to other unrelated languages and providing locale specific versions as needed.

A possible solution
A possible way to allow this would be to allow the definition of Language Families and have the ability to assign entities to either a Language Family or a specific locale language.

Using the above use case, we would have a Language Family of English (en) with locale specific variations of US English (en-us) and UK English (en-uk). An entity could be assigned a language of en, en-us, or en-uk. Entities with a language of en-us would appear on the US site, en-uk would appear on the UK site and en would appear on both the US and UK sites.

Is there someone already working on something similar to this for D8 that I can join?

Thanks,
Shawn.

Comments

Not sure I understand

lotyrin's picture

But an entity can't be "en", it's specifically one of the ("en-XX") locales (unless it's very limited in vocabulary).

That's exactly the point.

shawn_smiley's picture

That's exactly the point. Right now an entity has to be tied to a specific locale. But I think there are definitely use cases where an entity should belong to a parent language family rather than to a specific language.

Which is why I was proposing a language hierarchy so that content can belong to multiple related locales without having to be duplicated.

For example, say we have two nodes:

Node: About Us
Locales: en, fr

Node: My Product
Locales: en-us, en-uk, fr

The about us page would be displayed for both en-us/en-uk and a translation for France. Whereas the product node would have separate translations for US, UK, and France.

Even if this doesn't turn out to be a core feature, it would be nice to at least have hooks available in D8 to implement something like this as a contrib module.

Drupal 8

kristen pol's picture

I don't think this is planned for Drupal 8 but Gábor Hojtsy would be the one to address this.

For the example above (only), you could have a fallback language of English and then the specific US and UK English languages as well. But, that fallback would be for all languages. And, this only addresses the case if you have one set of languages that need a "parent" which is not what you are going for.

Maybe one option would be to allow each language to have a different fallback language?

Kristen

There's some issue in the

jose reyero's picture

There's some issue in the tracker about separating both concepts: Language (en) and Locale (en_US). Then some Locale to Language mapping should do the rest.

The feedback was not very enthusiastic though so it doesn't look like we are building that anytime soon.

Great. Thanks for the

shawn_smiley's picture

Great. Thanks for the feedback everyone. I'll do some research to see if there is a way to achieve this via a contrib module. I'll see about submitting patches for D8 if I see small changes that could make implementing something like this easier.

Internationalization

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: