Language for content types without language support must be Neutral
dvinegla - May 15, 2008 - 10:33
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | language system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
In you creates content type without language support, default language is assigned to it.
I think it must be '' (neutral) or FALSE

#1
I completely agree. For example, the i18n module for D6 has the option to filter content and one of the filter-options is 'including neutral'.
Let's say you create a custom node-type that just contains a photo; it's language-neutral and it's silly to assign the default language to it.
I found this problem while upgrading my site form D5 to D6 and added the 'translate' function only to stories and not for pages yet. New pages didn't show-up when visiting the 'non-default' language version of my site.
Attached patch just removes the 'offending' code in function locale_form_alter() in locale.module. and the SimpleTest didn't complain after running the tests.
#2
Had the same issue. Thanks for the Patch. It is working for me as well
#3
Look good and all tests pass (thx Testbed ;-)
#4
I'd like to have Gabor review this.
#5
I think that there are more levels here. While for photos, this looks like a valid use case, you might have other areas where this does not apply. For example, you have a single foreign language blog (let's say French), there you would not enable language selection for blog posts, since you only have one language. But your blog posts are definitely not language neutral, they are French. So there might be two options to not add language selection to a content type: to assign default language or to assign language neutral. This could be another possibility in the locale module provided settings additionally to what we have on content types already.
If you language-enable a content type, it means you can select from at least Language neutral and a specific language, so it is not a one-op thing as you assert.
#6
I'm with Gàbor! A setting for default-language is needed: none (or language neutral) or Default (default site language)
I know that this feature won't be added into D6, but will be useful to have some module that implenent this (and maybe also http://drupal.org/project/preserve_language features).
Regards
#7
Following a request from thePanz, the Preserve Language module now implements this fix for Drupal 6. The code was contributed to the module by thePanz.
I've only just committed it to CVS - so package might take up to 12 hours to be ready.