Localization: Customizing Hard-Coded Site Content
The locale module is used to substitute text which is hard-coded within CivicSpace to create alternative language sets for a site.
Site designers can also use it to replace CivicSpace terminology with more site contexualized text. For instance, an administrator could customize the descriptions of the node types listed on the create content page. Or change the label for the links underneath nodes, such as replacing "add new comment" with "post your thoughts" or something similar.
To begin using the the locale module,
- First turn on the module and give the administrator permissions.
- Go to the localization section of the admin menu and add a language.
- Assuming English, create a custom language by adding "en-US" in the Language code text field.
- Give your language a name, such as "custom-English" (be sure not to use spaces in your language name), and add the language.
- This will return you to the main localization page. Set your new language, "custom-English" as enabled and as the default. Save the configuration. Then disable the original "English" language set (otherwise users will be given the option to choose between the two in their account area).
- Now, any time you visit a page with CivicSpace hard-coded content, it will be added into your language set database.
- Once you have visited a page that you wish to change the content, return to the manage strings area of the localization section. Enter in the string you wish to search for. Edit the result and enter your replacement text.