Posted: September 22, 2014 at 2:44 am
|
Hello I’ve changed my wordpress installation to German (as described here: https://eventespresso.com/wiki/how-to-change-languages/ ). WordPress and part of EE4 is now German. I also (manually) created the directory ../wp-content/uploads/espresso/languages and downloaded the German mo/po files from Github event_espresso-de_DE.mo and event_espresso-de_DE.po and uploaded it to the directory. I tried to refresh, empty cache etc, but the translation won’t appear. (i double checked with Poedit that the phrases are translated, which they are). regards |
Hi Philipp, Can you let me know which version of WordPress you are using? |
|
|
Hello I’ve just upgraded to WP 4.0 |
Is the German option activated in WP > Settings > General (last option on the page)? |
|
|
Hi Yes I did. WP is now German and part of EE4 as well. I just installed the event_espresso-de_DE.mo and event_espresso-de_DE.po to have additional translation. regards |
Hi Phil, Could you get the latest files from GlotPress: https://eventespresso.com/glotpress/ — |
|
|
Hi I just downloaded the PO and MO file (again). Uploaded it to ../wp-content/uploads/espresso/languages … did a refresh. nothing changed. I’m looking for line 5747 or 15343 in the .po file where it says Verfügbare Plätze / Available Tickets they should appear on this site, right? http://awesomescreenshot.com/0183j5enee |
What are you trying to change “Available Tickets” to? — |
|
|
If I read correctly, ghe German PO file should translate it to “Verfügbare Plätze” as defined on line 5747 or 15343 in the .po file…. not? Phil |
It should as it is used by the ticket template file: http://cl.ly/image/0L1f1h3P3I3p I’ll run some testing and update this support post. — |
|
|
Thanks! In the meantime I’m translating/approving your German translation file. regards |
Hi, Could you give this a try: function mycustom_filter_gettext_available_tickets( $translated, $original, $domain ) { // This is an array of original strings // and what they should be replaced with $strings = array( 'Available Tickets' => 'Verfügbare Plätze', 'Available Tickets:' => 'Verfügbare Plätze:', // Add some more strings here ); // See if the current string is in the $strings array // If so, replace its translation if ( isset( $strings[$original] ) ) { // This accomplishes the same thing as __() // but without running it through the filter again $translations = get_translations_for_domain( $domain ); $translated = $translations->translate( $strings[$original] ); } return $translated; } add_filter( 'gettext', 'mycustom_filter_gettext_available_tickets', 10, 3 ); — |
|
|
September 22, 2014 at 11:56 pm Hey Lorenzo What should I do with this? 😉 regards |
|
Hi, You can either add it to your themes functions.php or better yet use a custom functions plugin, we have instructions on how to create one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
Hello I’created this and yes, Verfügbare Plätze are now correct. The thing is, that I would like to use the PO/MO file to make the translation and not change every word/sentence for it selfe. I also registered as an translator at your site to modify MO/PO’s. that way everybody could benefit from my work …. regards |
Hi Philipp, Can you provide me with a copy of the .PO and .MO files that are not working please? The ones located within wp-content/uploads/espresso/languages/ I’d like to take a look at the files and see if there is any reason for them not to load. If you could email them to support[at]eventespresso.com I’ll take a look. |
|
Hi Philipp, The files that you have sent, are those the exact files you are currently trying to use? The reason I ask is the filenames are currently incorrect. EE4 looks for ‘event_espresso-*locale*.mo’ So in this case the files should be renamed to event_espresso-de_DE.mo/po Then placed within wp-content/uploads/espresso/languages/ Your translations should then work correctly. |
|
|
OK it works ! yeahh !!!!! |
Thank you for letting us know 🙂 |
|
Hello again Philipp, 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. — |
|
The support post ‘EE4 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.