Reviewed & tested by the community
Project:
Translation Management Tool
Version:
7.x-1.x-dev
Component:
Source: Entity
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 May 2015 at 09:48 UTC
Updated:
17 Sep 2018 at 20:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirSomething with the patch doesn't look right. Looks like you copied the api.php and then made a partial diff against that?
This should show up as a new file in the diff.
field_collection => link.
I don't think that LANGUAGE_NONE here is correct, that should be the target language?
Comment #3
mpgeek commentedIn my use case, i needed to support link title translation only, as the path/URL is handled by another means (URL context switching). Here is a correctly formatted patch. That does exactly that. I didn't need to implement
hook_field_type_tmgmt_populate_entitysincetmgmtalready knows how to deal with text. The only thing required was to supply the structure.Comment #4
mpgeek commentedComment #5
mpgeek commentedComment #6
mpgeek commentedSorry. Try this patch, it gets rid of the extra code block in the end that was commented out of #2.
Comment #7
GDrupal commentedPrevious patches fail populating the entity when the trasnlation is back, attached a more functional patch.
Comment #8
claudiu.cristeaHere's one trying to build the foundation for other cases.
Comment #9
claudiu.cristeaWell, the URL should be also translatable. More, the 'attributes' column might contain the HTML 'title' attribute and that can be configured to be a user input.
Comment #10
berdirI'm not convinced about the URL being translatable.
Our understanding of translatable is different than core. It's whether a translator ( a real person but also google/microsoft machine translation) can actually provide a translation for it. That's not really the case with a URL.
Comment #11
claudiu.cristeaBut when the translator is a human, it might be desirable. Then automated translators can implement a hook that post alters the structure and get out the URL.
Comment #12
Delphine Lepers commentedI have tested patch #9 successfully on several sites
Comment #13
dxvargas commented@Bedir and what about if we need to target external URLs in different language versions? Seems to me a very common use case where a translatable URL would be handy.
I've tested #9 and it works.