Support

Home Forums Event Espresso Premium Some translated strings are not showing

Some translated strings are not showing

Posted: February 17, 2015 at 1:48 pm


Visual Facilitators

February 17, 2015 at 1:48 pm

1. I have some translated strings in my .po and .mo file which are still not showing up on the page.
For example:
In the event list: “Register”
Registraion Form, Step 1: “Attendee Information”, “Payment Options”, “Proceed to Payment Options”
– All the pop-up messages in boxes
In my own question group: “This field is required”
In the Receipt/Invoice: “Additonal Charge/Discounts”, “For [EVENT]”

I use the .mo from this folder
/wp-content/uploads/espresso/languages/event_espresso-de_DE.po

2. How can I translate the country names in the country dropdown?


Josh

  • Support Staff

February 19, 2015 at 8:51 am

Hi Heinz,

It turns out that some of the strings in the .pot file need to be updated. We are working on making that happen. In the meantime, you can use a translation function like the one on this page to translate the newer strings:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

The above will also work for country names, as well as the Additional Charges/Discounts string.

Re:

– In my own question group: “This field is required”

The validation messages for the questions can be user input. That means you can go into edit the questions and input your own “this field is required” message specific to that question in the “Required Text” field.

You’ll also be able to use a translation function to translate the default text and it will apply where ever the default text is used in an upcoming release.


Visual Facilitators

February 19, 2015 at 10:46 am

Thank you Josh, that code snippets help. Not ideal but helpful for the moment.


Visual Facilitators

February 19, 2015 at 10:50 am

The above will also work for country names, as well as the “Additional Charges/Discounts” string.

Did not work for country names and “Additional Charges/Discounts”


Visual Facilitators

February 19, 2015 at 10:53 am

This did not work to:

function ee_proceed_to_button() {
return ‘Weiter zu’;
}

add_filter (‘FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to’, ‘ee_proceed_to_button’);

function ee_payment_options_button( $translated, $original, $domain ) {
$strings = array(
‘Payment%sOptions’ => ‘ Zahlungsoptionen’
);
if ( isset( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}

add_filter( ‘gettext’, ‘ee_payment_options_button’, 10, 3 );

Outcome: “Proceed to Zahlungsoptionen”


Josh

  • Support Staff

February 19, 2015 at 11:51 am

Hi Heinz,

The Proceed To text string isn’t translation ready at the moment. It will be in an upcoming release because there is some work being done on that.

With the states, those can be modified from within the countries editor.

Can you share the line of code you’re using to change the “Additional Charges/Discount” string so I can investigate?


Visual Facilitators

February 19, 2015 at 11:57 am

I have put the Phrase in this code snippet:

function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Register’ => ‘Anmelden’,
‘Confirm and go to payment page’ => ‘Anmeldung abschließen’,
‘No events available…’ => ‘Zur Zeit keine Veranstaltungen…’,
‘Additional Charges/Discounts’ => ‘Zusätzliche Gebühren/Rabatte’,
‘ show details + ‘ => ‘Details anzeigen +’,
‘ hide details – ‘ => ‘Details verstecken -‘,
‘Search:’ => ‘Suchen:’,
‘Austria’ => ‘Österreich’,
‘Germany’ => ‘Deutschland’,
‘Switzerland’ => ‘Schweiz’,
// Add some more strings here
);

and I found it in my .po
Screenshot


Josh

  • Support Staff

February 20, 2015 at 8:53 am

Hi Heinz,

The “Additional Charges/Discounts” text is used to generate the default receipt. The translation will kick in either a) if it’s a new install or Event Espresso or 2) you reset the template. Here’s a screenshot that shows the Receipt template editor.

If you haven’t made any edits to the Receipt Template, you can reset the template and it will pick up your translated text. If you have made edits to this template, I can advise making the edit directly to the template.

The support post ‘Some translated strings are not showing’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso