Salsa has the ability to display public-facing pages in other languages via the Internationalization Package. For example, here's a signup page that is displayed in German:
If a supporter provides an invalid email, then the message is still in English:
This problem has been reported to our developers and is in process. Meanwhile, there's a workaround that can translate the text to the language of your choice. Interested? Read on!
The solution is to provide an alternate script for validating the email address. The script does exactly the same validation that Salsa normally does. The difference is that it looks at the page URL and changes the message if the language specifier (
/l/whatever) is in the URL. This solution appears in two parts: Installation and configuration.
This script needs to be installed in all of your templates that are used by pages in languages other than English. Here are some steps that you can use.
- Edit a template.
- Locate the
</body>tag using the browser's search tool.
- Insert a blank line just before the
- Click here to see the solution.
- Click on the
Rawbutton. A new window containing just the source will appear.
- Copy the source.
- Paste the source into the newly inserted line in the template.
- Save the template.
The script provides a German translation for "Please enter a valid email address." when
/l/ger appears in the page URL. If you would like the page to detect another language (like French) then configure the script using these steps.
Before you begin
- Determine the language code for the language that you would like to translate. You can find a list of the supported languages in the documentation for the Internationalization Package.
- Have the translated message on hand. As a reminder, the message must be encoded using UTF-8. Others don't work as well with Salsa.
Steps you can use
/l/gerin the script.
/l/and your chosen language code. For example, change
- Copy the translation for "Please enter a valid email address."
- Paste it between the apostrophes in this line:
Note: Paste carefully so that the apostrophes are not disturbed.
- Double check that the language specifier and the message are correct.
- Save the template.
If you have any questions, please collection this information:
chapter_KEYif you are in a chapter
template_KEYof the modified template
- The URL of a page that uses the modified template
- A screenshot, if possible
Send this information to firstname.lastname@example.org, and we'll be glad to help.