I really need a cck language field, separate from the node:language field.
This D6-patch (Module does not work) turned the module into a proper cck field.
I took the patch and ported it to D7. See attached files.(no patches, sorry)
It contains:
- 'cck' fields
- 2 default widgets (select list + buttons)
- formatters for iso2; name; language icon (icon+name still open)
- two options
-- all installed/enabled languages
-- all languages (not working right now; please hack to toggle this option, or adjust to include list from includes/iso.inc.)

Comments

omissis’s picture

awesome! thanks :)
I will integrate as soon as I can get my brain on it in the next few days. I'd better hurry to prepare everything for the git migration as well.

johnv’s picture

omissis, I wasn't satisfied with the previous version. The attached version includes also:
- working switch on 'field settings'-tab for all/enableds languages
- working widgets for select list/checkboxes
I have introduced the following incompatibilities with your initial version:
- CHAR12-field instead of CHAR2-field, as indicated before, to be in line with core-language-field (and e.g. 'pt-pt' in iso.inc);
- column name 'iso2'->'value', which is in line with other fields;
- ...

And some tips for your project page:
- add a tag for the new Categroy 'Fields'
- rename the title to 'ISO 639 (Language Field)'

Success, I enjoyed porting it, and learned a lot!

johnv’s picture

StatusFileSize
new11.19 KB

now with files.

omissis’s picture

Hi,
thanks a lot for your effort. As I said in another ticket, this module wasn't meant to provide a functionality per se, but to support the epub module, therefore I understand your disappointment.
Anyway, I will review your patches and see if they don't break anything (but I think they will, it won't hurt to add some other functions to the module).

Cheers

Anonymous’s picture

@johnv - I need this for a couple of fields 'Original Language' and 'Other languages' but the link to your second patch/module code in #3 isn't working for me (is it because it's got a '#' in?

Your first patch/module code works great but as you say it needs to be hacked to provide a complete list as in iso.inc. I see there's a function _locale_prepare_predefined_list() in includes/locale.inc so was going to use that.

If you can re-post the latest code that would be great thanks!

johnv’s picture

StatusFileSize
new13.6 KB

Here's a new zip.
I added Feeds integration.
I can't figure out Views integration for the Exposed filter. Any volunteers? (Seems a Views issue, though)

johnv’s picture

StatusFileSize
new13.6 KB

Hm, new attempt to add the zip.

johnv’s picture

For D7, there is now also a language field module.

alan d.’s picture

@omissis
Right, apologies for step on you toes by creating the language field module. I missed this when searching for "Language Field" type modules (I didn't think to search for ISO 639)

Johnv is looking at either porting your module to d7 or to integrate features into language field module. So...

1) Will you be looking at porting this to D7 or would you prefer to move things to Language field?

If the former, I can mark mine as a duplicate and refer people to your module.

If the latter, would you like to become the primary maintainer or a co-maintainer of Language Field?

Personally, I think that the namespace of "Language Field (languagefield)" is clearer to users than "ISO 639", so my preference would be to keep the this going. User counts also suggest this is the case with 100 for my D7 version and 35 for your D6 version, with both modules doing effectively the same thing [albeit there are now more D7 installations than D6 installations favoring the counts towards mine].