Needs work
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Reporter:
Created:
10 Apr 2013 at 14:26 UTC
Updated:
6 Jun 2019 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sutharsan commentedbump, any one a solution for this?
Comment #2
plachMarked #2092785: Add Entity Translation integration as a duplicate of this one.
Comment #3
tusik commentedAre the devs planning on supporting the translation of the profile2 fields, beyond just the label? Has anyone dealing with this issue find a workaround?
It would be extremely useful for multilingual sites, especially when they involve languages that use different alphabets, like cyrillic, for example.
Comment #4
sadmetall commentedis there any update about this issue?!
Comment #5
szeder commentedSame question here. Are the profile fields translatable?
Comment #6
spleshkaYou can use i18n_field module to translate your fields. Or what functionality do you need?
Comment #7
szeder commentedThis issue concerns translating the content of a profile field. The i18n_field module allows for translation of text associated with a field's settings.
Comment #8
spleshkaAh, do you mean that we need to add language to a profiles, like in nodes?
Comment #9
szeder commentedI don't know exactly what is needed. Switching between translations of the same field content would have sense but this is probably an Entity Translation module issue.
Comment #10
chaugi commented@Spleshka
As described in entity_translation.api.php we need hook_entity_info to declare something like following:
I am still trying to get it working right. After adding this information I see extra checkbox "Profile" at admin/config/regional/entity_translation in "Translatable entity types". Enabling it we should be able to see translation tabs available here user/1/edit/myprofile2, but currently I get error on this form save:
Comment #11
spleshkaThanks for your hint, @chaugi. Now it is a bit clearer for me.
Comment #12
matt.rad commentedBump.
Comment #13
spleshkaGuys, sorry, currently have no time for this issue. If anyone will provide a patch - I will love to commit it!
Comment #14
rockie667 commentedIf I understand this issue correct, then in fact profile2 textfields are not translatable by the owner of the profile - correct?
Ok, then profile2 is obviously not usable for multilingual sites! :(
Thanks anyway for making clear that it is not an issue of wrong configuration or so!
Comment #15
sakiland commentedYes, that's right @rockie667. Profile2 doesn't have support for entity translation. I've made same patch that add this functionality. I'll post it in few days. It's not ideal, not flexible, but it does the work. I think it's a good start point for this issue.
Comment #16
rockie667 commented@sakiland: thank you so much for your efforts - but unfortunately for me it will come too late! For me the only chance was to create node based profiles.
Just for any future projects I maybe will work on: What is the current state of your patch?
Comment #17
jlongbottom commentedAny progress on the patch for this?
Comment #18
Sakhmed commentedI am surprised that there is no multilingual support for this module!
Subscribed!
Comment #19
attisan@sakiland - mind sharing your patches?
Comment #20
mvlabat commentedThese were hard several days for me learning entity, entity_translation API and writing this patch... But it is ready, finally :)
So test and review, you're welcome)
P.S. I've patched profile2_page module, so for entity translation support you have to enable profile2_page submodule and configure appropriate profile types.
Comment #21
mvlabat commentedHere I made some fixed for the cases if there is no profile types created or we can't create any valid schema.
A note for users and testers:
You can get entity translation working only if you set a profile type to be displayed on a separate page.
The path to view (edit and translate) the entity is /profile-%profile_machine_name/%uid
Comment #22
vlad.dancer@mvlabat, could you please write a step-by-step guide how to test this manualy in UI.
Comment #23
mvlabat commented@vlad.dancer,
Firstly, you have to enable profile2_page module.
Then, for the profile type, which you want to test, go to its configuration on /admin/structure/profiles/manage/
and check "Provide a separate page for editing profiles." option.
Enable profile2 as a translatable entity type on /admin/config/regional/entity_translation.
Then go to /profile-
/ and here you can test it.
If "Translation" tab doesn't appear, firstly save some data to your profile to create an entity.
Comment #24
Richard15 commentedHI, I followed your guide but still I can't see any "profile2" checkbox under Translatable Entity Types...
Comment #25
msteurs commentedThanks @mvlabat for the patch. I had to create a new one against the latest revision of dev branch. I add it here, hope it may serve anyone.
Comment #26
mattheweigand commentedWhen I use this patch along with profile2 registration path I get this error several times during user registration.
Notice: Undefined property: stdClass::$uid in EntityTranslationProfile2PageHandler->getPathInstance() (line 22 of <site>/sites/all/modules/profile2/contrib/includes/translation.handler.profile2_page.inc).The user is not registered and doesn't get an email.
Comment #27
praveen_91 commentedI have applied this patch and it's working yet
thanks
Comment #28
tostinni commented#25 is working for me too, however here is an updated patch with a better permission management for translations.
Right now the patch #25 display the translate tab if a profile is created
return (bool) $args[0]->pid;which let anonymous users see it ;).Comment #29
miguelbraga commentedFor some reason I can't patch this (using osx), can you guys help me out? I really need translation for profile2 profiles...
Comment #30
rickj commentedI've just checked this, and it looks like a slightly spurious line in patch file #28. Here's a corrected version.
Comment #32
drupalpal commentedDears,
Can someone upload the module with the patch included? I don't seem to be able to get it work. Automatic patch did not work and Manual patching does not yield the required results.
Thanks.
Comment #33
rickj commented@drupalpal
I'm not able to test this myself as I'm not using translation, but I've tried applying patch #30 to 7.x-1.5, and latest dev, and it applies OK. A few complaints about shifted line numbers, but the resulting code appears clean.
What problems are you having with the patch, and what's your exact meaning of "automatic" and "manual"?
Comment #34
maryedith commentedI am trying to apply this patch to profile2_7.x-1.5.
I have created a /patches directory under modules/all/contrib/profile2 for the patch.
Running $git apply patches/patch_name.patch does nothing.
It appears to add a file into config/includes dir . There is no contrib/includes dir; nothing is added
It also appears to edit contrib/profile2_page.inc. It does nothing.
Please explain. We need to translate profile 2 fields. Thanks!
NEver mind. I used
$patch -p1 < patches/profile2_7.x-1.5-1966640-30.patch