Node language is a feature of node module and locale module, and works without content translation module turned on. Although Views says the node language is a node translation filter. It should be available even if content translation is turned off. One can have a blog and post different language posts without ever translating them, so node languages work without content translation being turned on.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Title: Node language should be an available filter without node translation being enabled » Node language should be available without node translation being enabled

Erm, of course not only filter, but also field, sort criteria, etc. Retitled.

nedjo’s picture

Yes. We should move that field and its accompanying handlers from the translation (back) to the node module.

merlinofchaos’s picture

Version: 6.x-2.1 » 6.x-2.6

Hm. This never happened. It still should

dawehner’s picture

Status: Active » Needs review
FileSize
9.15 KB

Here is a patch.

merlinofchaos’s picture

Hmm:

[merlin@furor views]$ patch -p0 < views-node_language.patch
patching file modules/locale.views.inc
patch: **** malformed patch at line 34: @@ -221,6 +244,9 @@ function locale_views_handlers() {

dawehner’s picture

Status: Needs review » Needs work

Update status

merlinofchaos’s picture

Setting needs work since I couldn't get the patch to apply.

dawehner’s picture

Status: Needs work » Needs review
FileSize
8.44 KB

Another try

merlinofchaos’s picture

Status: Needs review » Needs work

Ack. My commit spree has made this not apply *again*. :/

dawehner’s picture

Status: Needs work » Needs review
FileSize
8.25 KB

Update

esmerel’s picture

bumping up in the needs review list

dawehner’s picture

It's ok when you do it :)

iamjon’s picture

Version: 6.x-2.6 » 6.x-2.11
Status: Needs review » Needs work
FileSize
51.92 KB

Ok this is what I did.
I patched views 6.x2.11 and installed it on a vanila d.6.
I installed locale.
I gave page the option of multi-language with translation in submission settings.
I had one node in english and I devel generated 25 nodes, without language. I tried filtering and adding node translation arguments, and got broken handler language does not exist.
I did not find any option to sort the posts by language.

klonos’s picture

...shouldn't this go against latest dev? Also, I need to ask: would 7.x and 6.x-3.x benefit from this too?

BenK’s picture

Subscribing

Gábor Hojtsy’s picture

7.x would especially benefit from this since 7.x sites could very well use language support without the code translation module enabled. The contrib entity_translation module provides translation UI on the field level, and people are building sites with only that, and no core translation module. The node level language information is still used in that case heavily.

mariomaric’s picture

Version: 6.x-2.11 » 7.x-3.x-dev

Any news on (7.x version) of provided patch?

Kristen Pol’s picture

For entity-translated nodes, you can use the "Field Language" option in the "Advanced - Other" section that is provided by views.

But, I think it still seems useful to be able to have a view based on the "Content Language" filter even if no translation is happening on the site.

steinmb’s picture

Would love to see a port of the original D6 patch make it's way into 7. Is anyone working on porting the patch in #10?

sun’s picture

Status: Needs work » Needs review
FileSize
4.07 KB

Attached patch moves the node.language field and filter definition from Translation module to Locale module support.

damiankloip’s picture

This looks good and makes alot more sense to live in locale.

dawehner’s picture

Status: Needs review » Fixed

Just changed the patch to use hook_views_data_alter instead of hook_views_data for node.language.

Thanks for the help on this issue!

Status: Fixed » Closed (fixed)

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