Active
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2011 at 16:09 UTC
Updated:
1 Jun 2015 at 14:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Jerome F commentedComment #2
Jerome F commentedThough, I found that:
Use Drupal core t() function. Not recommended, as it doesn't support updates to existing strings.
Does that mean an other method would be prefered?
Comment #3
Jerome F commentedSo I have been told that I have to use the beta version not the last dev if I want to be able to translate.
Closing this issue therefore.
Comment #4
Jerome F commentedThe profile type label is not part of the interface, it's a field. How could we translate that? Is it something I should ask as a feature request in i18n?
Comment #5
Jerome F commentedI've learned a lot about entity translation, variable translations, i18n string translation, and I might be able to solve this.
I postpone this issue untill I'm sure I can't figure this out by myself. Don't want to fill the issue queue with my own TBD stuff.
Comment #6
DropInTheOcean commentedI have a related problem. The translation of field labels do not show up on my site's form (whereas the translations of the values do). I have the i18n module installed.
I've tried clearing all caches (Home » Administration » Configuration » Development » Performance, and refreshing and updating strings (Home » Administration » Configuration » Regional and language » Translate interface (string tab))
Any suggestions on how to solve/diagnose would be most welcome
Comment #7
DropInTheOcean commentedWith reference to the related problem, above. I found that the labels were duplicated in the 'built-in-interface'. So under "Filter translatable strings", choosing "Built-in-interface" and searching for the strings, I was able to translate the form labels.
Comment #8
Jerome F commented@DropInTheOcean thank you for the feedback
Comment #9
DropInTheOcean commentedHmm.. further to my comment last week, the labels have reverted to the original language (English), and I cannot now change them (Either under the filter Built-in-interface, nor under Fields.
Comment #10
Jerome F commentedYes those duplicated strings don't exist anymor her as well.
Comment #11
DropInTheOcean commentedHi Jerome,
There was an update to i18n on 11 June (1.0-beta7). As far as I can tell, this seems to have solved the problem of the missing label translations. Do you have the same?
Comment #12
Jerome F commented@DropInTheOcean: Hi, thank you for your answer.
I updated i18n and did a string refresh.
There's no way to translate the profile label, I think i18n doesn't handle it at all yet, as you can see in the 3 first attached screenshots there is no UI for profile translation and its label does not appear in the interface translation strings, you can just translate the permissions strings.
EDIT: this part is solved, see next comment:
As you can see in the 4 last attached screenshots, I can translate the field type name in a profile type but not the field label.
EDIT: all the screenshots named Capture... are duplicates - a posting mistake - sorry I thought I had deleted them...
Note, I see that on my test site, Profile is enabled in the Translatable entity types in /admin/config/regional/entity_translation
Comment #13
Jerome F commentedI confirm I don't find any way to translate the profile type label.
(side note: However you can translate the string "My @profile-label")
As for the field label translation that was my mistake, the test site did use French as default language and it still needs to be english.
Comment #14
Jerome F commentedI submitted a feature request in the title module issue queue, http://drupal.org/node/1189442
The requested feature is to replace the profile type label with a regular field just as it does for nodes or taxonomy terms, so that we can translate it with entity translation.
Comment #15
sw3b commentedSubscribe !!!
Comment #16
Jerome F commentedhere was the answer to the issue in the title module by plach:
Comment #17
clashar commented+1
Comment #18
gaele commentedThis is still a problem.
Comment #19
fagoThis is most likely going to be handled by #1356978: add basic i18n support - at least our solution will build upon this, thus setting to postponed.
Comment #20
taitai commentedNot sure if this is the same bug but I noticed a similar one:
(All 7 versions)
profile2.module, function profile2_user_view: '#title' => $profile->label
should be '#title' => t($profile->label)
Otherwise, you will not be able to translate the label
Comment #21
gaele commentedIs this fixed?
At least #1356978: add basic i18n support is.
Comment #22
ykyuen commented#20 works. but how about the profile label in the user edit page?
Comment #23
mxr576#20 didn't work for me, waiting for a correct solution
Comment #24
jepster_If I want to translate a profile field, I get in field info:
This is a user-defined string. You are not allowed to translate these strings.
Is this message part of this issue?
Comment #25
fraweg commentedSame #22 issue for me...
How can I change the label in the edit form?
Thanks for any Help!
Frank
Comment #26
fraweg commentedHello,
has anyone an idea how to translate the label in "/user/%/edit/profile"
Thanks for any Help!
Frank
Comment #27
vflirt commentedHi,
could you post some screenshots. I might be able to help you on that.
Comment #28
baher commentedHi,
Did you already activate the Profile2 transaltion of the MULTILINGUAL - INTERNATIONALIZATION(i18n) module ?
Baher
Comment #29
Pierre_G commentedHere's a dirty solution.
But hey, it's working :)
Comment #30
tusik commentedI have no issues translating the labels, but I want the actual fields to allow for a translation, like for any other entity. Has anyone implementing multilanguae profiles found a solution for that yet?
Comment #31
guy_schneerson commentedI am using version 1,3 and got Profile2 translation enabled. I can translate the profile type label however when visiting the user page the label is shown in English
Comment #32
guy_schneerson commentedJust tested on the latest dev and same issue
Comment #33
guy_schneerson commentedPierre_G in #29 the result of the menu_alter are cached so it will get stuck on one language. the correct hack is to set $items[$key]['title callback'] to a custom title callback and use a t() in the callback.
Comment #34
vflirt commentedHi,
if you take a look at my post here : https://drupal.org/comment/7467484#comment-7467484
you can see how the menu_alter should be done.
What is done is :
for each user category change the title callback to the custom one and then call _user_categories() which will return the translated label.
If you look at profile2_user_categories() it uses $info->getTranslation('label') for the category name.
Kind Regards,
Dobromir
Comment #35
kopeboyPlease fix this... it's simple and it's embarrassing.
To recap: the field label is translated, but the tab (secondary) menu link is not.
Using the latest dev..
Comment #36
joe_carvajalThank you @guy_schneerson!
Your comment #33 did me the trick to do a (custom) workaround about this issue.