Support

Home Forums Event Espresso Premium EE4 | custom biligual translation not working

EE4 | custom biligual translation not working

Posted: January 29, 2020 at 6:46 am


lze

January 29, 2020 at 6:46 am

Hi,

I’m currently setting up a new page with Event Espresso 4 (Version 4.10.1.p, set-up according to your guide) within the Avada Theme. The page is bilingual (Main: German, Second: English) and we’re linking into one Event Espresso booking channel that has so far not been customized beyond some test-events. Now optimally Event Espresso would be bilingual in the entire booking process.

For this I’m trying to change all strings on the booking pages (booking process, personal details, payment options etc.) to custom biligual strings (“German text / English text”), optimally with different colors for the languages. I’m trying to wrap my head around this for around two days now and it simply won’t work. So in my experience there has to be something obvious that I’m missing 🙂

Here is my journey so far:

As recommended in this thread (https://eventespresso.com/topic/bilingual-interface/) I followed your official translation guide (https://eventespresso.com/wiki/how-to-translate-event-espresso/#localized-wp) with setting the language, getting the German language file from GlotPress (the “.po” one) and changing some strings (that are displayed in my booking process) to nonsense to try out if this works. All according to this other guide of yours (https://eventespresso.com/wiki/how-to-change-wording-with-poedit/) with getting a .mo-file out of the process.

Here I encountered the first weird thing: the wp-content/uploads/espresso and then wp-content/uploads/espresso/languages-directories were both nonexistent and I had to create them both manually before upload.

After uploading the .mo-file in the fitting directory nothing changed. After updating the WordPress file permissions (https://eventespresso.com/topic/custom-files-not-working-2/) nothing changed. After trying to rename the .mo-file from “event-espresso-4-de_DE.mo” to “event_espresso-de_DE.mo” nothing changed. After creating my own blank index.php-file and saving it into wp-content/uploads/espresso/languages nothing changed. After trying every combination of options above… nothing changed.

During all this in the wp-content/plugins/event-espresso-core-reg/languages-directory I always found the (as far as I understand) “standard” language file to be “event_espresso-en_GB.mo” (my EE4 backend and frontend are both displayed in German!).

So I’m now at a loss what to do next, as I would highly prefer to not hardcode everything as outlined here with the custom functions: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/ and the Quick Localisation-Plugin seems to be basically the same as hardcoding and is lacking in support (afaik last updated a couple of years ago).

Help would be highly appreciated.


Tony

  • Support Staff

January 30, 2020 at 2:06 am

Hi there,

…getting the German language file from GlotPress (the “.po” one) and changing some strings (that are displayed in my booking process) to nonsense to try out if this works.

Which specific strings did you change? Some are cached when you create a registration so if you change the strings in the MO/PO file with an active registration, you have to cancel it and start a new one to see the changes.

Some strings are used when EE is activated and then you can edit them within the admin area, meaning the MO/PO files are NOT used on each request for those strings.

It depends on the specific strings so can you provide more details please?

Here I encountered the first weird thing: the wp-content/uploads/espresso and then wp-content/uploads/espresso/languages-directories were both nonexistent and I had to create them both manually before upload.

Sometimes that not really an issue, but other times it can mean you site does not have the correct permissions set up to access those locations, meaning when you add files to them your site can’t read them.

During all this in the wp-content/plugins/event-espresso-core-reg/languages-directory I always found the (as far as I understand) “standard” language file to be “event_espresso-en_GB.mo” (my EE4 backend and frontend are both displayed in German!).

Correct, that’s the ‘default’ language file downloaded by EE, if you want to customize the strings, you use the MO/PO files in wp-content/uploads/espresso/languages

After trying to rename the .mo-file from “event-espresso-4-de_DE.mo” to “event_espresso-de_DE.mo” nothing changed.

Both of those filenames are valid.

Can you send me a copy of the PO and MO file you are currently using, please?

After creating my own blank index.php-file and saving it into wp-content/uploads/espresso/languages nothing changed. After trying every combination of options above… nothing changed.

That index.php file will only be used if someone navigates directory to the /wp-content/uploads/espresso/languages/ directory, it won’t help here so ignore this for now.

So I’m now at a loss what to do next, as I would highly prefer to not hardcode everything as outlined here with the custom functions

The custom function is great for a couple of strings but not for many, you are much better with the PO/MO files for lots of strings.

and the Quick Localisation-Plugin seems to be basically the same as hardcoding and is lacking in support (afaik last updated a couple of years ago).

I’ve created a ticket to re-do the recommendations on that page, Quick Localization is not how I would recommend doing this anymore. LocoTranslate would be my recommendation, however, it needs to be set up in a specific way for it to function with EE so we’ll need to document that first.

If you can answer my questions above and send over your MO and PO file we’ll investigate this further.


lze

February 3, 2020 at 6:46 am

Hi Tony,

thanks for your quick answer.

I could change all the fields in e.g. the adress form in the backend.

Emptying the cache didn’t help.

Things I want to change and I have changed in the .po-file are for example:
– “*price includes taxes” to “*Preis enthält Steuern / *price includes taxes”
– “This field is required” to “Dieses Feld ist ein Pflichtfeld / This field is required”
– “Attendee Information” to “Teilnehmerinformationen / Attendee Information”
etc. etc.

So various things in the design of the booking process, in boxes, in error messages or your pop-ups (eg. the message when transferring to PayPal). I haven’t changed all I want to, just some examples to try it out.

As far as I understood the .mo-file also recognizes html/css/some form of-Tags, as I would like to be the English part in blue. But that would be just a bonus tho.

I changed the file permissions in WordPress as outlined here (https://eventespresso.com/topic/custom-files-not-working-2/) by Josh, but it also won’t work.

Where can I send you the .po/.mo-file? E-Mail? I can’t seem to find your personal or an official support adress

Thanks
Eric


Tony

  • Support Staff

February 3, 2020 at 2:16 pm

Hi Eric,

My apologies, you can use support[at]eventespresso.com

Just include a reference to this thread within the email so we know what the email is for.

The support post ‘EE4 | custom biligual translation not working’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 2 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!