Is it possible to translate "Home" reference title from this module with i18n?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blecheimer’s picture

Put this in your settings.php

$conf['i18n_variables'] = array(

    //custom breadcrumbs
    'custom_breadcrumb_home',

);

so you can change it per language in http://yoursite.com/#lang-prefix#/admin/settings/custom-breadcrumbs

hamsterbacke42’s picture

that worked for me thanks

MGN’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

MGN’s picture

@hamsterbacke82 or @blecheimer , can you verify that this still works with the latest 6.x-2.x-dev? Please see the bug report at #647570: 'Home' breadcrumb i18n not working. It would help to have this confirmed.

Thanks

tomsm’s picture

subscribing...

blecheimer’s picture

Sorry for the late answer I have Custom Breadcrumbs 6.x-2.0-beta2 and it works

blecheimer’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta2
xalexas’s picture

aaaaaah thanks a million for this! It worked!

sepehr.sadatifar’s picture

Status: Closed (fixed) » Needs review
FileSize
1.85 KB

I've made a patch that simply wrap 'custom_breadcrumb_home' variable used for 'home' text in 't' function so it possible to be translated without using i18n variables.

kalis1’s picture

Thank you @sepehrmm ! I've adapted your patch for the 7.x-2.x-dev version.

sepehr.sadatifar’s picture

tnx @kalis1 , I've forgot to patch 7.x-dev.
I've contacted MGN for considering to apply these patches.

kalis1’s picture

Version: 6.x-2.0-beta2 » 7.x-2.x-dev
FileSize
1.29 KB

Here's another patch for the 7.x-2.x-dev version, with a slight modification : I've chosen not to translate the default value for custom_breadcrumb_home in the admin settings form, neither translate the whole value like in my previous patch. It was causing a bug, as if the administrator was validating the form in a language other than english, the registered value in database was changed from "Home" to its translation.

Jibus’s picture

Category: task » support

According to http://drupal.org/node/299085, it seems that is the proper way to wrap the variable_get() through t()

#13 works perfect ! Thanks

Jibus’s picture

Category: support » task
Status: Needs review » Reviewed & tested by the community
kunago’s picture

Category: support » task

Nice. The patch in #13 fixed the problem on my site as well.
Please commit the patch.

Sk8erPeter’s picture

The patch in #1 on http://drupal.org/node/1320056 worked for me perfectly.
I also attached some screenshots to make it clear how to do the translation.

colan’s picture

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

Marking as a duplicate of #1320056: A small patch to add the home variable to i18n variables for Administrator translation as that seems to be the proper way of handing this (even though this issue is older).