Support

Home Forums Event Espresso Premium Split: How to translate frontend strings of text in EE4

Split: How to translate frontend strings of text in EE4

Posted: July 22, 2015 at 10:06 am


Peter Gore

July 22, 2015 at 10:06 am

Hi Dean, I have the same issue, there was no “languages” directory, I’ve created it
like this wp-content/uploads/espresso/languages – deactivated the plugin and restarted but there’s no .mo file to be found?


Lorenzo Orlando Caum

  • Support Staff

July 22, 2015 at 10:50 am

Hello Peter,

I’ve split your support post reply from the original support post here:

https://eventespresso.com/topic/how-to-translate-frontend-strings-of-text-in-ee4/

If you see an existing support post that sounds like your issue or question, then please create your own support post and then include a link to the support post that you saw. This will help us prevent confusion when multiple members are posting.

The file that you described won’t automatically appear there. What language are you wanting to use with Event Espresso?


Lorenzo


Peter Gore

July 23, 2015 at 1:51 am

Thanks…

English, but I want to change some of the front end content that is output by EE.


Dean

July 23, 2015 at 3:45 am

Hi,

Did you make sure that you add the WPLANG definition in wp_config.php? (I’m guessing US English here).

define ('WPLANG', 'en_US');

(https://codex.wordpress.org/Installing_WordPress_in_Your_Language)

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


Peter Gore

July 23, 2015 at 4:27 am

Hi Dean,

WPLANG is in place but I’ve still no file for EE in either..

/webroot/ROOT/wp-content/languages/
or
/webroot/ROOT/wp-content/uploads/espresso/languages/


Peter Gore

July 23, 2015 at 4:30 am

I found a MO file hiding here ->/webroot/ROOT/wp-content/plugins/event-espresso-core-reg/languages but no corrosponding PO file to edit. 🙁


Tony

  • Support Staff

July 23, 2015 at 4:37 am

I found a MO file hiding here ->/webroot/ROOT/wp-content/plugins/event-espresso-core-reg/languages but no corrosponding PO file to edit.

That file is side loaded by EE based on your site language settings, so you can not (and should not 😉 ) be able to edit that file.

You can download the PO files from our GlotPress project here:

http://translate.eventespresso.com/projects/event-espresso-4/en/event-espresso-en_US

At the bottom click the ‘Export’ link.

You’ll now have a file called:

event-espresso-4-en.po

Rename that file to:

event-espresso-4-en_US.po

Now edit the file within POEdit, when you save POEdit will create a MO file:

event-espresso-4-en_US.mo

Upload that file to /wp-content/uploads/espresso/languages/

The above location is ‘update safe’ so you don’t lose all of your translations each time Event Espresso updates.

So if you follow the above, (you may need to change a string within the PO file first) find a string you have translated, does it work?


Peter Gore

July 23, 2015 at 4:56 am

Hi Tony, thanks for the info, I’ve done that, uploaded the files and its not working.

When I go to edit the file POEDIT tells me “Language of the translation is the same as the source langauge”.

Do we have to rename, the site is set to GB, although I have tried uploading both and still its not working.


Tony

  • Support Staff

July 23, 2015 at 5:11 am

So site language is set to ‘English (UK)’?


Peter Gore

July 23, 2015 at 5:22 am

Yes, English (UK)

But, wordpress even tells you “Note: The WPLANG constant in your wp-config.php file is no longer needed.”


Tony

  • Support Staff

July 23, 2015 at 5:34 am

Ah, ok.

Then you need a different file.

http://translate.eventespresso.com/projects/event-espresso-4/en-gb/event-espresso-en_UK

Rename that file to event-espresso-4-en_GB.po then repeat the above.

But, wordpress even tells you “Note: The WPLANG constant in your wp-config.php file is no longer needed.”

The ‘Site Language’ option basically sets the definition for WPLANG within WordPress now, so you no longer need to manually set it within the wp-config.php file.


Tony

  • Support Staff

July 23, 2015 at 5:35 am

Something else I noticed, when you open that file in POEdit you’ll see this – http://take.ms/vgsJ4

Click ‘Set Language’, then add en_GB to the Language field – http://take.ms/TUjJd

Then save.


Peter Gore

July 23, 2015 at 6:00 am

Hi Tony, I’m not getting any issues opening the file, I’ve followed the rest of the instructions and still, its not working.


Tony

  • Support Staff

July 23, 2015 at 6:56 am

Can you send me to PO and MO files you are currently using please?

Please send them to support[at]eventespresso.com and include a link to this thread so we know what it relates to.


Peter Gore

July 23, 2015 at 9:48 am

Hi Tony, I’ve emailed you the files. If you could let me know your thoughts ASAP, that would be great.

To be honest we have had a complete nightmare up to this point getting EE to fit into our clients process, the biggest problem is the lack of multiple currencies. The initial docs give the impression that EE does support multiple currecies, just not at the same time. I’m not 100% sure we are going to continue to use it at this point.


Tony

  • Support Staff

July 24, 2015 at 4:31 am

Hi Peter,

I tested the files you sent over and the translations do seem to be working.

I used your PO file, changed ‘Events’ (Listed within Event Espresso -> Events) to ‘Events TONY’ and retested, this worked – http://take.ms/0XUQf

It depends on which string you are trying to translate, if you can provide further details we can help with this.

The initial docs give the impression that EE does support multiple currecies, just not at the same time.

Can I ask which doc shows this?


Lorenzo Orlando Caum

  • Support Staff

September 12, 2015 at 2:52 pm

Hello again Peter,

We have a new resource that explains how to translate Event Espresso. You can view it here:

https://eventespresso.com/wiki/how-to-translate-event-espresso/

Also, GlotPress now has translation strings that are up to date for the current Event Espresso 4.8.x platform.


Lorenzo

The support post ‘Split: How to translate frontend strings of text in EE4’ 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