How to make Location fields synchronized when I'm adding the new translation?
Maybe there could be some integration with i18nsync
See: #368198: Location fields shouldn't be translatable

Comments

milos1234’s picture

subscribe

jonodunnett’s picture

subscribe

yesct’s picture

Title: Location fields synchronized when adding new translation » Location fields synchronized when adding new translation (i18n, i18nsync)
Status: Active » Postponed (maintainer needs more info)
Issue tags: +location translation, +location compatibility with other modules

tagging.

Could you please add some more information. Provide an example showing what is currently happening and what you want/expected to happen. Maybe that will help others see what you want, and get you more ideas for a solution. :)

jonodunnett’s picture

OK. More information about what happens and what I would like to happen.

I have a custom content type that includes a 'spot location' that is chosen by clicking on a googlemap. The content type also has a image attached, and various text fields.

When the content type is translated the edit form on the new translation will automatically have the attached image the same as the original, it will copy the original content from the various text fields, but the spot location latitude and longitude fields will be empty.

I would like the spot location to copy the coordinates from the original untranslated version so I don't have to enter them again, for every translation.

If there could be an option to keep the locations synchronised (changes in one language propogate throughout all translations) that would be even better.

Don't know if that is possible but would be great if it is.

yesct’s picture

Status: Postponed (maintainer needs more info) » Active
yesct’s picture

I wonder if certain cck fields can be marked "do not translate" and then are inherited directly for each translation?

jonodunnett’s picture

That doesn't appear to be an option. On the content-type edit form the "Synchronise Translations" section has check boxes to synchronise the usual stuff (Author, Status, taxonomy terms etc), also the CCK textarea fields I created and the attached image nodes can be syncronised, BUT there is currently no option here to synchronise location.

summit’s picture

Subscribing, shouldn't location be synchronized through a webservice instead of manually, just a suggestion..
greetings, Martijn

maxferrario’s picture

Please note that I am using i18n module, and activated the "Syncronize translation" module too.
If I go to http://mysite/admin/content/node-type/my-node-type and open the "Workflow settings", under "Synchronize translations" I have the opportunity to syncronize the CCK field "Project location", that is provided by the Location module under the name "Location CCK".
Apparently there is a way to configure a CCK field to appear in the "Syncronize translations" list: the README.txt file of the i18nsync module reads

Drupal module: i18nsync (Synchronization)

This module will handle content synchronization accross translations.

The available list of fields to synchronize will include standard node fields and cck fields.
To have aditional fields, add the list in a variable in the settings.php file, like this:

// Available fields for synchronization, for all node types.
$conf['i18nsync_fields_node'] = array(
'field1' => t('Field 1 name'),
'field2' => t('Field 2 name'),
...
);

// More fields for a specific content type 'nodetype' only.
$conf['i18nsync_fields_node_nodetype'] = array(
'field3' => t('Field 3 name'),
...
);

Hope this helps

jonodunnett’s picture

That provided the lead to sort out the issue I was having, as I couldn't find the field name to use as post #9 explains.

The problem I was having was that I was using the location module but not as a CCK location field. The end result gathers the same information, but only the CCK method provides the option for syncronisation across translations. Once set up like this is worked as desired and expected.

There wasn't any need to specify the fields as you explained. It just worked straight off. Guess an update somewhere means they get automatically picked up now...

Thanks for the lead.

yesct’s picture

Status: Active » Fixed

The fix seems to be to use cck locations. I'll mark this fixed (I also considered "won't fix". I don't know which would be better); post back if still have questions.

vthirteen’s picture

for those who want to use location instead of location's submodule "location cck" (there seem to be reason for that), here's another solution. a tiny patch for i18nsync.module which is already in dev version of i18n module:

http://drupal.org/node/426294

Status: Fixed » Closed (fixed)
Issue tags: -location translation, -location compatibility with other modules

Automatically closed -- issue fixed for 2 weeks with no activity.