Hi,

Please make the field titles translateable. I've done it myself in _get_field_details by replacing

'#title' => $am__settings['title'],

with

'#title' => t($am__settings['title']),

Would be great if that could be incorporated into the code.

Comments

beautifulmind’s picture

Okay.
Thanks for pointing this out.

Regards.

beautifulmind’s picture

I got more robust solution:

'#title' => t('@field_title', array('@field_title' => $am__settings['title'])),
thesaint_02’s picture

The foreach loop after the normal assignment sometimes overrides the title, so an even better solution would be the following statement after the foreach loop (some context here)

foreach ($am__settings as $key => $value) {
    $am__field[$om__result->field_name]["#". $key] = $value;
}
// Translate title field
$am__field[$om__result->field_name]["#title"] = t($am__field[$om__result->field_name]["#title"]);

Why is the solution with the replacement more robust?

beautifulmind’s picture

Yes I got that too.

beautifulmind’s picture

Status: Active » Fixed

Please install 1.x-dev version.

Regards.

Status: Fixed » Closed (fixed)

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

temuccio’s picture

Version: 6.x-1.x-dev »

Hello,
I have installed the 6.x.2.x-dev version but the translateable field don't work. I have one multilanguages site, how to i can fix this problem?

beautifulmind’s picture

Hello,
Thanks for your concern and using the module.
The 1.x branch of the module is no more maintained, instead use the latest stable release in 2.x branch. There is an easy way to upgrade. After installing the module, you need to run update #6020 and 6021.

Regards.

elpino’s picture

Version: » 6.x-2.x-dev
Category: feature » bug
Status: Closed (fixed) » Active

Hello,
I tried running the updates as you suggested, but it doesn't work. Upon examination of the code, I don't see the t() function applied to the #title field anywhere... maybe the changes weren't applied by mistake in the 2.x branch?

Please correct me if I'm wrong.

beautifulmind’s picture

Hello,
I've commited the fix. Please try it.

Thanks for your concern and using the module. I really appreciate it.

Regards.

elpino’s picture

Status: Active » Reviewed & tested by the community

Thanks, downloaded and tested, works like a charm.

beautifulmind’s picture

Status: Reviewed & tested by the community » Closed (fixed)