Patch to get the shipping quote labels (entered by shop-admin) translated with i18n
Taken from:
http://www.ubercart.org/forum/internationalization/15162/multilingual_sh...
Please take this in the next .dev (uc_flaterate)
change line 181
from:
$method->label,
to:
t($method->label),
and line 241
from:
$quotes[] = array('rate' => $altered, 'format' => $formatted, 'option_label' => check_plain($method->label));
to:
$quotes[] = array('rate' => $altered, 'format' => $formatted, 'option_label' => check_plain(t($method->label)));
Thanks to kyk from ubercart.org
Comments
Comment #1
blecheimer commentedSorry: changes are in uc_flatrate.module
Comment #2
tr commentedNo, you can't translate arbitrary string variables using t(). The method names used by flatrate are user-defined and stored in the database.
Comment #3
tr commentedSee also #1066364: META: Make custom data translatable.
Comment #4
tr commentedClosing this in favor of handling all these issues directly in #1066364: META: Make custom data translatable
Comment #5
pieterdcThe patch from @blecheimer works for me.
Thanks for sharing.