Support

Home Forums Event Espresso Premium EE_4 german translation of months

EE_4 german translation of months

Posted: June 10, 2014 at 1:08 pm


Martin Langeder

June 10, 2014 at 1:08 pm

Hey,

I really did a lot of searching in the forum but none of the solutions worked for me. My problem is that I use the german version of wordpress and therefore I also want to translate EE_4, of course.
I downloaded the .po files and did put them in the correct location (uploads/…). Everything works perfectly, but the names of the Months. I translated them in the .po file and uploaded the .mo. It’s strange because the abbreviations (nov, dec,…) work just fine in the upcoming events widget in the sidebar.

I hope you can help.
cheers martin

see: http://laparoskopietage.at/kursanmeldung/


Dean

June 11, 2014 at 1:32 am

Hi Martin,

I tested this on a German WP install. I had some issues with it at first, but I believe it is down to caching, as the translations did go through correctly once I had cleared the browser cache. http://take.ms/wZrbC

I could not check your calendar, as the link provided did not show the calendar at all.

I assume you have the language files in wp-content/uploads/espresso/languages/ ?


Martin Langeder

June 11, 2014 at 2:22 am

Hi Dean,

It is not in a calendar. It is the headline of the short code [espresso_events]. Not the headline but the date under the headline.
I’m afraid it is not the cache because I already thought about that and also tried different browsers with fresh caches.
Yes the language files are in content/uploads/espresso/languages/

Thanks
Martin


Dean

June 11, 2014 at 6:50 am

Hi Martin,

Sorry about that, I think I misunderstood you there.

OK, I see the issue now. This is something that we are looking to resolve in future updates (it’s currently in testing).

If you would like to, it could be resolved manually by editing the template – see here for further information https://eventespresso.com/topic/format-date-and-time-in-ee4/


Martin Langeder

June 12, 2014 at 6:16 am

Hey Dean,

I’m sorry but I changed the code in an other template. I already did some customization to show the start and the end date instead of the start time. The template file is the content_espresso_events_header.php.
code:

<code>&lt;?php 
//echo &#039;&lt;br/&gt;&lt;h6 style=&quot;color:#2EA2CC;&quot;&gt;&#039;. __FILE__ . &#039; &amp;nbsp; &lt;span style=&quot;font-weight:normal;color:#E76700&quot;&gt; Line #: &#039; . __LINE__ . &#039;&lt;/span&gt;&lt;/h6&gt;&#039;;
global $post; 
?&gt;
&lt;header class=&quot;event-header&quot;&gt;
	&lt;h1 id=&quot;event-details-h1-&lt;?php echo $post-&gt;ID; ?&gt;&quot; class=&quot;entry-title&quot;&gt;
		&lt;?php the_title(); ?&gt;
	&lt;/h1&gt;
	&lt;?php if ( ! is_archive() &amp;&amp; has_excerpt( $post-&gt;ID )): the_excerpt(); endif;?&gt;
	&lt;h5 id=&quot;event-date-p&quot;&gt;
		&lt;?php 
		if ( isset( $post-&gt;EE_Event ) &amp;&amp; $post-&gt;EE_Event instanceof EE_Event ) {
			echo $post-&gt;EE_Event-&gt;primary_datetime()-&gt;start_date();
			echo &quot; - &quot;;
			echo $post-&gt;EE_Event-&gt;primary_datetime()-&gt;end_date(); 
		}				
		?&gt;
	&lt;/h5&gt;
&lt;/header&gt;</code>

If I understand this right it fetches the start_date() and the end_date().
I don’t need to change the date format that is right but it just does not translate the names of the months. (I translated the .mo files, every other translations works)

regards martin


Josh

  • Support Staff

June 12, 2014 at 7:41 am

Hi Martin,

Where you have this:

echo $post->EE_Event->primary_datetime()->start_date();
echo " - ";
echo $post->EE_Event->primary_datetime()->end_date();

You can use this instead:

espresso_event_date_range('j. F');

Please note that you don’t use echo with the above template tag.


Martin Langeder

June 12, 2014 at 7:53 am

Thanks that did the trick. The translation of the month names is now german.

regards martin


Josh

  • Support Staff

June 12, 2014 at 8:07 am

You’re welcome.


Josh

  • Support Staff

June 23, 2014 at 1:58 pm

Hi Martin,

The fix for the month name translation was added to Event Espresso 4.2.6, which was just released as an update.

The support post ‘EE_4 german translation of months’ 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