Posted by nieuwkar on May 26, 2011 at 3:41pm
11 followers
| Project: | Drupal core |
| Version: | 7.8 |
| Component: | locale.module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The title is pretty much self explanatory. I have a Dutch Drupal 7 site with a content type containing translated fields. After upgrading to 7.2 these Dutch fields switched back to English for some reason.
This can't be working as designed or can it? Anybody out there for support?
Comments
#1
This is not so obvious as you are supposing it to be, it's a behavior never observed before so something weird must be going on. Would you please provide some more information on your setup? Languages installed, languages enabled, language negotiation settings, language-related contrib modules installed, and anything else you think might give a clue of what is happening.
#2
Sure, I'll try to be as precise as possible. I have two languages enabled which are Dutch and English. Dutch is the default language. The negotiation settings are set to use the default language (Dutch) and the only language related modules I´ve installed are the locale (core) module, the localization client module and the localization update module.
I had given the fields English labels which I'd translated into Dutch. The only odd thing I see is that the content translation module is not necessary to translate content.
#3
Ok, now I understand your issue: you were talking about field labels. The t() calls that allowed strings to be (incorrectly) translated have been removed. See #1157426: Field system uses t() incorrectly and inconsistently.
#4
Mmm ok thank you for your quick response.
So how do you suggest to translate these labels? use a field template? This also implicates that core themes have to be updated doesn't it?
#5
As stated in the other issue the solution is the 18n_field submodule shipped with the i18n package.
#6
Right, sorry for that.
#7
Hello,
This issue shouldn't be fixed yet. I have the same problem, which seems to have popped up right after the Drupal 7.2 upgrade. My site is "live" and is hosted on an Aegir account so it is not really possible to patch i18n or revert back to Drupal 7.0.
For instance, I have a field called "Role" in a content type called "Profile". The string is :
field:field_role:profile:label
The English original label "Role or Position" used to be correctly translated to "Rôle ou fonction" in French. Now the English label appears both in the French node AND the node edit form, although the translation is still OK in the database.
Language negotiation is set to url (en/node-title, fr/node-title)
I should add that views-related strings (such as block titles, etc.) are OK. The problem, as far as I know, happens on the default Drupal node display.
#8
@paradiso:
This is unfortunate but, as stated above, this cannot be fixed in core, it was an error to let field labels be translated through
t(). As a temporary measure until this is fully addressed by i18n_field you can pass your field labels throught()in the theming layer.#9
#10
I guess this is fixed.
#11
I have the same problem. After upgrading to Drupal 7.2 fields titles are not translated anymore. Can you please tell me is this a bug which will solve in say 7.3 or it's a permanent things.
I did not found i18n_field submodule in i18n moudle
#12
This is a permanent thing. The i18n_field is a submodule of the 7.x version of i18n:
http://drupalcode.org/project/i18n.git/tree/90b6d77ae1f62e05dd00cf8fcfc9...
#13
Subscribing to this issue and #1157512: Labels are not translated with i18n_field for Drupal core..
#14
I've added this to the 7.2 release notes since this seems to be a common support request.
A new release of i18n module would really help people who come across this. In retrospect, I should've waited until that was done before committing this patch. :(
#15
@webchick:
We've done this exactly because i18n_field could not go on without t() calls being removed.
#16
OK, i18n-7.x-1.0-beta7 seems to be the solution. @see #1157512: Labels are not translated with i18n_field for Drupal core.
#17
I've had the same problem, last week, and after upgrading from 7.2 beta 6 to beta 7, it looks like it's mostly fixed. But not completely.
In particular: the word "Title" still appears in English, as do the labels for date fields (associated with the Date module) which are rendered translated in view mode, but not in edit mode.
In the attachments, see 2 cropped screenshots of the same record. Note that "Date of first use" and "Date of registration" appear in English in edit mode, and in view mode, in Dutch as "Datum van ingebruikname" and "Datum van inschrijving" respectively.
BTW I just noticed that the date format is wrong, too: it uses the format for English instead of the format for Dutch as it should. I'm pretty sure this worked as intended last week. I don't know if this is just an unexplainable glitch (as often happens in Drupal, unfortunately), or if it is related to the upgrade to beta7.
update Deleting the date format for English, under "Localize date formats" (q=admin/config/regional/date-time/locale/en/edit), so it reverts to the system default, which is "dd/mm/yyyy", makes it appear as it should in Dutch. So it really does use the format for English. In Dutch.
#18
Bartl: please follow up in the i18n module issue queue. Read up what people have experienced in #1157512: Labels are not translated with i18n_field for Drupal core. and if related post there. If unrelated but connected to field property translation, please open an i18n module issue.
#19
Automatically closed -- issue fixed for 2 weeks with no activity.
#20
Another field property that gets run through t() : #1220964: Number field prefix/suffix get t()'ed through format_plural().
Feedback from i10n / i18n folks welcome :-)
[edit : oops, I means that for #1157426: Field system uses t() incorrectly and inconsistently. Well, works here too...]
#21
Well, after updates to newer versions of Drupal and of several modules, the problem fixed itself, without me doing anything else. I don't know which upgrade fixed it, but it's nice that it did.
#22
The problem persists on Drupal 7.8, i18n-7.x-1.0 (stable) with i18n_field properly activated, and field labels properly translated in the database.
Just can't get the translated field labels to show in the French node edit form and the nodes themselves.
There must be a way to fix sites that were set up before that very annoying 7.2 core upgrade. Things work fine with a fresh Drupal install, so I guess something's screwed in my DB.
#23
@paradiso: Do you see those translations when you go to the "Translation" tab on the field's configuration screen?
#24
@gabor : yes, I do.
#25
@paradiso: ok, that service is provided by the i18n module, not Drupal core. If that is not working, this is an i18n module bug. You already seem to be on #1157512: Labels are not translated with i18n_field for Drupal core. which looks to be the i18n bug counterpart to this. Moving back to closed (fixed) as per the above.