tags:

views:

58

answers:

3

Hi Guys,

I'm using the module "simplenews" and during the registration process it reads "Select the newsletter(s) to which you wish to subscribe.".

I'd like to change this line and wanted to ask what the best way is to do so without hard coding it?

Thanks in advance!

+1  A: 
  • Since it's located in a form, an easy and quick solution would be to change it with hook_form_alter.
  • Another solution would be to create your own custom version of the language english in Drupal and then "translate" the string into something different.
  • You could also skip the translation part, and use your settings.php file. You can create some custom string override in it without enableling the locale module. From the default.settings.php file:

    /**
     * String overrides:
     *
     * To override specific strings on your site with or without enabling locale
     * module, add an entry to this list. This functionality allows you to change
     * a small number of your site's default English language interface strings.
     *
     * Remove the leading hash signs to enable.
     */
    # $conf['locale_custom_strings_en'] = array(
    #   'forum'      => 'Discussion board',
    #   '@count min' => '@count minutes',
    # );
    
googletorp
+2  A: 

I've also done this with the custom english version just so I could override a few strings. It works and is easier than hook_form_alter, but it also creates a bit of unnecessary overhead, especially if your site is otherwise not localized/multilingual.

There is nowadays a light and easy solution, that uses the same locale system, but you don't need to setup a custom english language or code anything: the "String Overrides"-module.

http://drupalmodules.com/module/string-overrides

Surprisingly, it's one of the top rated modules, out of over 5000 module.

Ilmari
A: 

Or you can use http://drupal.org/project/stringoverrides

chx

related questions