Is there a way to rename Buddylist so that it users, for example, see it as: Friends, Kindred, or Homies? I recall that the older Buddylist module let you do such a thing.
Thanks,
sicjoy
Is there a way to rename Buddylist so that it users, for example, see it as: Friends, Kindred, or Homies? I recall that the older Buddylist module let you do such a thing.
Thanks,
sicjoy
Comments
Comment #1
nodestroy commentedHi,
yes, of course.
every string and every message can be translated over the drupal translation system (localization)
just enable locale module, add a new language and you can search and change the buddylist_ui AND buddy_api strings.
NOTE:
to rename the "Buddylist" or "Pending Requests" string, you have to rename the view. (administer -> site building -> views)
regards,
dominik
Comment #2
nodestroy commentedComment #3
nodestroy commentedComment #4
mpaler commentedSo just to be clear, do we edit the actual buddylist_api file or is there some sort of method to "override" so we don't have to edit the core module file?
Thanks for a great module!
Comment #5
davidmoreton commentedHi mpaler
You don't want to edit the buddylist module itself, particularly if you share modules between sites.
Either create a custom function in your template.php (just edit the function you have quoted) or for more general changes, you can edit _any string_ used by Drupal by activating the Locale module as suggested by dominik. This uses .po files which contain all the information but you don't need to get involved in that to just alter one or two words.
activate Locale
Under site config->localisation->manage languages set up a new language for your site. You need a language name and a code.
Be aware that multi-lingual sites work by putting your language code into the path like
domain.com/en/news
domain.com/ar/news
for english and arabic. So you should choose a language code for your custom language that will make sense when it's in the path for all your content. 'content' might work for you or 'files' or some such.
Export the new language translation as a .po file
Import the file that you just exported
(I found that without this step, I couldn't edit strings)
Go to manage strings
Find the string you want to change
Type in your 'translation'
save
Drupal will then substitute any strings you have changed
Make sure the language is active and default and that should work.
hth
davros
Comment #6
mpaler commentedPerfect instructions. Thankyou!