2

I have a multilingual setup (2 languages), and I would like to create Personal Campaign Pages.

But some the user interface texts are not translatable:
- The thermometer texts are not translatable: "x% towards our goal", "€ xxx raised", "Goal: xxx"
- The texts about the Honor Roll at the bottom of the contribution page are not translated: "Show my contribution in the honor roll", "include my name and message", "list my contribution anonymously"
- "Create your own fundraising page" link at the bottom is not translatable
- Text at the bottom of the contribution page "This contribution is being made thanks to the effort of xxxx, who supports our campaign..."

How can I get these texts translated?

1

Some of these strings are configurations, others are core-strings in the CiviCRM source code.

  • templates/CRM/PCP/Page/PCPInfo.tpl : <div class="thermometer-pointer"><span class="pcp-percent-raised">{$achieved}%</span> towards our goal</div>

    • This string is missing the {ts}...{/ts} to expose the string to the translation system.
    • It should also be noted that since this has a variable, the variable should be passed like this: {ts 1=$achieved}<span class="pcp-percent-raised">{$achieved}%</span> towards our goal.{/ts} (in some languages, there might be a space before the '%' sign, and we can't assume that the string would always translate as "x% [rest of string]".
  • the other strings in that file, such as 'Goal', 'raised' are in "ts". Looking at Transifex, the strings seem to be there. In what language was it missing? Did you check in Transifex?

  • "Create your own fundraising page" this is a CiviCRM contrib page configuration, but the configuration does not seem to be flagged as a multi-lingual field. This would require a schema change and an upgrade function.

  • "This contribution is being made thanks to the effort of xxxx, who supports our campaign..." : looking at the code, this string seems to be mostly hardcoded. However, you can change it using a buildForm hook (change the variable/string assigned to the template).

More information about CiviCRM translation can be found here:
https://wiki.civicrm.org/confluence/display/CRMDOC/Internationalisation+for+Developers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.