2

I'm busy translating user facing parts of CiviCRM to a local language.

I've changed some of the text on the Event page. I.e. Register, Event Fee Fields. But some of the reminders like when a user is already registered still shows up in English.

I've used PoEdit to edit translation files but none of these fields are included. Only back-end fields are included in the translation file.

Here are examples of fields I'd like to translate:

  • "It looks like you are already registered for this event. If you want to change your registration, or you feel that you've gotten this message in error, please contact the site administrator. You can also register another participant."

  • Continue Button

  • "Please verify the information below. Click the Go Back button below if you need to make changes. Otherwise, click the Continue button below to complete your registration."

  • "Your registration will not be submitted until you click the Continue button. Please click the button one time only. If you need to change any details, click the Go Back button below to return to the previous screen."

  • "An email with event details has been sent to ..."

  • When
  • Location
  • First Name
  • Last Name
  • Your Registration Info
  • Participant Info
  • Event Information
1

2 Answers 2

2

All those strings should be in transifex (and compiled in the .mo files). Please keep in mind that the string might contains HTML and what you see as one big paragraph on the screen might be in fact be a concatenation of several strings.

For example, your first example is in fact 2 separate strings in transifex (and the second one contains HTML) :

    $statusMessage = ts("It looks like you are already registered for this event. If you want to change your registration, or you feel that you've gotten this message in error, please contact the site administrator.") . ' ' . ts('You can also <a href="%1">register another participant</a>.', array(1 => $registerUrl));

You can find those string (for fr_CA) here :

If after looking in transifex, you can't find the strings, it might be three different problems :

  1. there is a missing ts (translation function) in the code, meaning there is bug that should be mentioned in the issue tracker (gitlab)
  2. the string is a new one or has been changed and transifex is not yet up-to-date
  3. there is bug with the string extractor

Once you have updated the string in transifex, you need to extract po files and compile them or wait for the automated process to compile them for you (once a day) -> http://download.civicrm.org/civicrm-l10n-core/mo/fr_CA/civicrm.mo (replace fr_CA by your locale)

0

It Seems the best way to solve this is to create a custom template using Smarty. The trick is not getting these overwritten everytime you upgrade.

I've read you can actually put your template files in a custom directory which sounds a bit safer. This would require a comparison for changes in syntax during each upgrade.

Override CiviEvent Templates in Wordpress

Missing CiviEvent Translations

According to enter link description here this is a legacy way of doing things. And changes to templates should be incorporated into a Extension. Creating Extensions.

So the correct answer is create an Extension to style or add custom translations

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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