I would like to customize some of the strings hardcoded in modules and I am not sure what the best approach is.
For example, the e-Commerce module will display "State" and "Zip" code in several places, but in Canada these are called "Province" and "Postal Code". I know that I can edit the PHP files directly but I would rather avoid this for several reasons (these changes will be overwritten next time I upload a new version; also, this won't work in a multi site environment).
Is it possible to achieve this with translations? Can I create a "Canadian English" translation that will contain only the strings that are specific for Canada and the rest will default to the main English translation?
Any suggestions are more than appreciated.
Thanks,
Marius
Comments
I used to use the locale module
for stuff like that. It worked fine back then (Drupal 4.4), but I haven't used it since, so can't comment on how relevant it still is or not.
--
Anton
I did look at the locale
I did look at the locale module but I could not figure how to use it for this purpose. Could you give me some hints in this regard?
Thanks,
Marius
Sorry my memory is a bit hazy
But I seem to remember creating a custom language. You then get an admin area where you can see all the translatable strings in Drupal - I think the string database needed to be populated after setting up locale by visiting the pages that used them. Then you get to choose replacement strings for these strings.
Does that help?
--
Anton
Instructions can be found here
I just needed to do exactly the same thing myself. Instructions can be found here: HOWTO: Creating a customized language set to replace Drupal terminology