Support

Home Forums Event Espresso Premium demystify the translation files

demystify the translation files

Posted: December 10, 2014 at 9:46 am


Guillaume Goyette

December 10, 2014 at 9:46 am

Wordpress 4.0.1
EE 4.4.5.p
+ Calendar Calendar (EE 4.3+) 3.2.1.p

I have Event espresso partly translated to french and this was done automatically because my define(‘WPLANG’) is set to ‘fr_FR’

I need to complete the translation files because I want the front-end completely in french. I did allot of tries and I am now confused

I noticed 2 folder where to put translation files

wp-content/plugins/event-espresso-core-reg/languages
wp-content/languages/plugins/event-espresso

and I saw here https://eventespresso.com/topic/translation-not-working-tried-almost-everything/

a 3rd location

wp-content/uploads/espresso/languages

First question : are they the good directories ?

Second question : I suppose at least one of them is for the front-end translation, wich one is it ?

Third question : When I edit the .po file using PoEdit to add some translations, do I have to compile the .mo file also ? Or I can just replace the original .po with my updated one ?

Thanks


Tony

  • Support Staff

December 10, 2014 at 10:34 am

Hi,

I’ll try and clear up some of the confusion.

wp-content/plugins/event-espresso-core-reg/languages

This is used by the Event Espresso plugin itself. When you set a language within WordPress itself, Event Espresso detects this and downloads a language file from our github repo (if available) and stores this file in the above location.

Please do not use this for your own translations, they will be overwritten on EE updates.

wp-content/languages/plugins/event-espresso

This is the WordPress languages directory and is used by WordPress to store language files. You could use this directory for you mo/po files, however we also check this location:

wp-content/uploads/espresso/languages

Which is the location I would recommend placing your languages files.

Second question : I suppose at least one of them is for the front-end translation, wich one is it ?

Only one file should be used and that contains the translations for both front-end and the admin. A little more on MO/PO files below.3

Third question : When I edit the .po file using PoEdit to add some translations, do I have to compile the .mo file also ? Or I can just replace the original .po with my updated one ?

You edit your PO files, then generate your MO file, and update the MO file to used for translations.

PO files provide a way for yourself to edit the translations, MO files are the compiled (machine code) version of the same thing, they are to be used by your WP install.

So to answer this question, you download the PO file. At this point I recommend double checking the filename is correct, it should be event_espresso-*locale*.po, so in this case event_espresso-fr_FR.po

Open that within POEdit and make any changes you need. When you save POEdit will automatically generate a MO file with the same filename.

Upload that MO file to:

wp-content/uploads/espresso/languages/

(You can also place the PO file there so you have a copy later if you need to re-edit… However it will NOT be used by EE, just the MO file will be)

Event Espresso should then load your latest changes from that MO file. To make further changes re-edit the PO file, generate a new MO file and replace the one above.

Does that help?


Guillaume Goyette

December 10, 2014 at 11:55 am

Wow thanks allot… this is so clear now !!

I feel that e sho

I will test this before updating the topic as “Resolved”


Guillaume Goyette

December 10, 2014 at 11:58 am

sorry about my weird sentence, let me start over :

I feel that you should explain it like this in this page :
https://eventespresso.com/wiki/translating-event-espresso/


Guillaume Goyette

December 10, 2014 at 1:57 pm

ok, I did a first test with one specific string and it now wok perfectly

Thanks Tony !!


Lorenzo Orlando Caum

  • Support Staff

September 13, 2015 at 7:45 pm

Hi there Guillaume,

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 version of Event Espresso.

Thanks!


Lorenzo

The support post ‘demystify the translation files’ 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