- Entities should be loaded in the correct language. See #650134: Translatable title and page path for possible issues.
- Should language negotiation also be an argument in the API?
- Per-language caching.

Comments

klonos’s picture

subscribing

xano’s picture

Also see comment #14 in #350509: Expand active links in tree view. We can use entity class constructors to do entity translation as well.

klonos’s picture

Great!... I do not know what that means,... but it sounds that you're actually onto something.

Please, let us know if we can help with testing once you've got something ready.

klonos’s picture

sorry,... btw any estimation on when some (even temporary) solution will be available?

xano’s picture

It's done when it's done :P I work on this in my spare time and I hope to be able to release a final in Q1.

klonos’s picture

ok thanks for letting us know. Didn't mean to annoy you with a 'are we there yet?' question. We'll be happy to have it when you are ready. In the meantime, as I've already said, let us know if we can help with testing.

Thank you for your free time spent on this.

xano’s picture

You didn't annoy me at all :) It's just the standard "We don't know when, we just know what." answer.

You can already start testing if you want to. Everything that's in the download package should work, except for some weirdness that occurs when creating and removing layers in the hierarchy, but that's a known bug I'm trying to figure out. If there's anything else wrong, feel free to create a bug report.

This is not personal, but it would be cool if could stick to entity translations here. Just open up another issue if something else is bugging you :)

klonos’s picture

Any news on the progress of this one?

xano’s picture

Nope. I'll post new info as soon as it becomes available. You're free to help coding though.

klonos’s picture

@Xano: [risking to cause your wrath here...] I see your hands are full right now, but this concerns all multilingual sites. So... any plans on looking into it soon?

PS: my coding skills and Drupal internals knowledge aren't that good yet, otherwise I'd already have coded something.

Thanx and sorry beforehand.

xano’s picture

I'm looking into content translation, but should Index get nodes by NID like core does or by TNID? Core treats nodes as completely different entities, even if they're translations of eachother. Should Index do that, or should it treat nodes grouped by translation?

xano’s picture

StatusFileSize
new1.06 KB

First stab :-P

klonos’s picture

I manually patched my index.classes.inc and I am willing to test.

Switching language on index pages (vocabulary index) doesn't switch terms to corresponding language. Perhaps this aims at something else I am missing. What is this supposed to do? What should I test? Let me know and I'll report back.

xano’s picture

The patch is only very minor and only allows an index to have a language. I don't always post patches here that actually work or do something useful at all. This patch is just a start contaning two miserable line changes.

Anyway, the real problem here is how to deal with translated content and how to let administrators decide how language negotiation goes. I am thinking about adding a select list that allows "Language neutral" or one of the languages available in Drupal. #650134: Translatable title and page path will probably not work with this and be marked won't fix, as one can simply duplicate an index and set a different title, description and page path.

The second problem, which is more specific, is as I already mentioned in my previous post how to select nodes based on a language. Core treats nodes as individual pieces of content, even if they're translations of eachother. Should Index do the same or should it group nodes by TNID (this indicates which nodes are translations of eachother) to make sure no different translations of the same content are loaded at a time?

klonos’s picture

I am not familiar with the drupal 'internals', but I think I recall trying out a taxonomy-related module that was language-aware. Let me do a little bit of searching and see if we can 'borrow' some code or ideas from another project so we won't reinvent the wheel.

xano’s picture

It's mostly about consistency and providing behaviour that won't confuse users.

xano’s picture

Assigned: Unassigned » xano
Status: Active » Needs work
StatusFileSize
new4.08 KB

This patch allows admins to select a language for indexes. All that needs to be done now is implement the actual entity translations.

xano’s picture

I'm also thinking about moving this to the filters, because this *is* about filtering on language and because not all entities can be translated.

klonos’s picture

I think Taxonomy block is that i18n-aware module I used. Switching to different languages worked perfectly.

xano’s picture

Status: Needs work » Fixed
StatusFileSize
new15.33 KB

This patch contains al necessary API changes to allow entities to be translated. Indexes can now be language neutral, use the active interface language or have a fixed language. Translations are decided on a per entity type basis and need to be implemented for each of them separately. Next to API changes the patch also makes nodes translatable. Translation of other entity types should be dealt with in other issues, one entity type at a time.

Added and committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xano’s picture

Assigned: xano » Unassigned