choose language code or prefix as trigger

marcvangend - November 18, 2008 - 10:23
Project:Language Sections
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I have a multilingual setup with languges un the "lc-XX" format (like "nl-BE"). I found it not very user friendly to let end users type this (case sensitive) language code and I prefer to use the url prefix, as defined in Drupal's language system, instead. End users can't be expected to care about RFC4646 language codes - they only care about the url where their content will end up.

That's why I wrote this patch. It adds a new variable and two radio buttons on the filter configuration page. With the trigger setting changed to 'url prefix', the "nl-BE" language can now be triggered using "== be ==".

I wrote this patch for D6 only, so this code will probably break when the module is running in a D5 environment, or do nothing at best. That's why I'm marking it as 'code needs work'.

AttachmentSize
language_sections_trigger.patch2.01 KB

#1

netgenius - December 10, 2008 - 23:44

Seems like a good idea. I can't help thinking that the whole issue of translation and multi-language sites in Drupal needs a major re-visit/re-design. Language Sections is arguably a hack for something that should be easier to do in out-of-the box Drupal - hope the Powers-that-be are listening!

Sorry for my lack of activity - I try to do Druapl open-source stuff when not tied up on other projects, but recently have been very tied up as part of a team taking on the UK Government and others, so not a minor project - www.ksfiomdepositors.org

 
 

Drupal is a registered trademark of Dries Buytaert.