I developed a module that added the possibility to set a fixed or dynamic default language and the possibility to remove 'Language neutral' from the language select box and adds a '- Please choose -' option as first in the select box. (Language select). These features were talked about by other users (http://drupal.org/node/198355 http://drupal.org/node/250891 http://drupal.org/node/527862).
The first new version of i18n included part of this functionality (to remove 'Language neutral'). So I created a patch for i18n to add the extended default node language selection.
After applying this patch the checkbox 'Set current language as default' is replaced with a select box 'Select default language'. From this select box you can choose a dynamic or fixed default language.
- Dynamic:
- User language = The language of the user creating the node as set at 'My account >> Edit'
- Interface language = The language of the interface the user is viewing (e.g. www.example.com/node/add/page -> English, www.example.com/nl/node/add/page -> Dutch)
- Fixed
- Any of the languages enabled for the site
- No default language = Sets the dropdown to '- Please choose -'
- Language neutral = Falls back to No default language if Disable Language neutral is selected
I hope I made the patch correctly.
Comment | File | Size | Author |
---|---|---|---|
#3 | i18n_language_select_dev_20100810-corrected.patch | 7.35 KB | alduya |
#2 | i18n_language_select_dev_20100810.patch | 7.39 KB | alduya |
i18n_language_select.patch | 5.62 KB | alduya |
Comments
Comment #1
alduya CreditAttribution: alduya commentedComment #2
alduya CreditAttribution: alduya commentedAttaching a new version of the patch made against dev.
There were some mistakes in the previous version. It is now also possible to lock the language to a admin defined language (dynamic or fixed).
Please review and return feedback or set status to rtbc.
Comment #3
alduya CreditAttribution: alduya commentedSorry, I already found a small error. Use this corrected file.
Comment #4
botrisConfirm this to work
Comment #5
squarecandy CreditAttribution: squarecandy commented#3 works great for me.
Definitely need to force users to create new pages in english, and then create spanish translations later if they choose to.
Would be great to see this make the next release.
Thanks!
Comment #6
botrisComment #7
botrisPlease commit, now I have to repatch on every update...
Comment #8
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #9
Tebb CreditAttribution: Tebb commentedSubscribing: Seems to make sense. Does this conflict with any other requirements?
Will this be in the D7 version?
Comment #10
zilverdistel CreditAttribution: zilverdistel commentedsubscribing, looks like an interesting improvement ...
Comment #11
Jose Reyero CreditAttribution: Jose Reyero commentedWe are not adding new features for 6.x, maybe try for 7.x
Comment #12
Tebb CreditAttribution: Tebb commentedWould still like to see this in D7.
Comment #13
Jose Reyero CreditAttribution: Jose Reyero commentedWould need D7 upgrade. However I don't know how this will play with already existing D7 options for node language.
Comment #14
Jose Reyero CreditAttribution: Jose Reyero commentedIt seems there's no intereset on upgrading the patch, so closing.
(Remember this is not a wish list, so reopen *only* if you post a upgraded patch).