Problem/Motivation

A language context would be an easy way to make e.g. panels caches language aware (Context based cid).
Further it would be handy to be able to react on / use properties of a language.

Proposed resolution

The attached patch defines a context with a variety of settings that make it very flexible.

Remaining tasks

Reviews needed

User interface changes

None

API changes

None

Comments

Status: Needs review » Needs work

The last submitted patch, ctools-add-language-context.patch, failed testing.

das-peter’s picture

Status: Needs work » Needs review

ctools-add-language-context.patch queued for re-testing.

das-peter’s picture

Ooops, there were leftovers from the refactoring I made.
Fixed patch.

thepanz’s picture

Issue summary: View changes

Patch works fine. Thanks a lot! :)
I am using this "language" context in https://www.drupal.org/sandbox/thepanz/taxonomy_et_helper

esolitos’s picture

Hei das-peter, thanks for this patch, it's very useful! However i found a bug in the plugin when using the given placeholder form.

+++ b/plugins/contexts/language.inc
@@ -0,0 +1,162 @@
+function ctools_context_language_conf_defaults(array $conf = array()) {

When using the "placeholder form" $conf is a string coming from the input textfield.
So either the placeholder form should be more advanced or this function should handle the string parameter.

I'll see if I have some minutes to fix a patch for this.

esolitos’s picture

Status: Needs review » Needs work
esolitos’s picture

Status: Needs work » Needs review
StatusFileSize
new6.39 KB
new1.59 KB

Hei, here's the new patch and the interdiff, in this way also using the given placeholder form works.

thepanz’s picture

You have a typo: search `languaghe` :)

clairedesbois@gmail.com’s picture

Hello,

I uses this patch to have more contexts in page manager. I configure a context on language for each variant but It doesn't work when I export configurations in features.

I'm searching the bug's reasons.

esolitos’s picture

StatusFileSize
new6.38 KB

Fixed the typo in the patch, sorry or the long delay. :-)

pol’s picture

Status: Needs review » Reviewed & tested by the community

Patch #22 worked successfully, thanks !

esolitos’s picture

Hem.. #22? I guess you mean #11?

pol’s picture

Yes patch in #11, sorry for the typo.

rivimey’s picture

japerry’s picture

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Now that 1.13 is being rolled with new features, this can be included. Committed!

  • japerry committed 422e82b on 7.x-1.x authored by das-peter
    Issue #2010896 by esolitos, das-peter: Provide language context
    
pol’s picture

Thanks!

Status: Fixed » Closed (fixed)

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