Posted: May 6, 2013 at 2:05 pm
|
Hi, the last post I’ve seen on this was from January 2013 and on version 3.1.29. Has this been fixed? Any updates? I’m using version 3.1.31.3.P. It’s true that I can translate most text manually in the template.php, but the day in the date I cannot. It’s a little strange to read “Monday” on an invoice that is entirely in German otherwise. I also have issues with the umlauts. None of these are displayed correct. Again: The labels I can change to ae, oe, ue, but the text coming from the database (name, address) are displayed wrong. This makes the invoice unusable for me. None of the other payment options work for me either. Thanks for the help, Stephanie |
|
Are you using a custom date format in your WP general settings that includes an “l”? |
|
Yes, I do. Because I would like to show my users which day a date is. I’m using dates only for the events, since I’m not really implementing a blog. Taking it out is not really an option. Everywhere else on the website it’s translated fine. This suggestion also doesn’t really solve the underlying problem, that the report is not translated and doesn’t show special characters correct. Regarding the umlauts: It’s interesting that the text added at the end of the invoice, which I configured in the gateway settings, is displayed correct, whereas text coming from the template.php (e.g. column headers) or other texts from the database (address, name) are not. I also checked the encoding of my database. It’s set to UTF8. |
|
Actually, I just double checked the collation of each of my tables… While the default collation is set to utf8_general_ci, I also have tables with utf8_unicode_ci. All of the wp_events* tables are utf8_general_ci, but wp_events_recurrence is utf8_unicode_ci. All of the standard WP tables are utf8_unicode_ci. In which table is the text from the gateway configuration stored? Does it have a different collation from the one where the address is stored? Even if the collation turns out to be one of the problems, it doesn’t explain the label problem (e.g. column headers). I appreciate your help with this. |
|
Hey Stephanie, great to find another german user of EE 🙂 If you want to get in contact with me (i’m doing the german translations etc.), feel free to send me an email to geisler.marko@googlemail.com 🙂 |
|
It looks like the day of the week on the invoice problem is being caused by this line (114 in template.php): $pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date(get_option('date_format')), 0, 1, 'R'); //Set invoice date The problem is that the php function “date” is returning a string with the day of the week in english. Try putting this line right before it: setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); This should cause php to return the string with the day of the week in german instead. |
|
Hey Sidney, i don’t know if there is a ticket for this already, but using the latest EE Version, the dates written in the event overview-page in the backend were localized correctly, but when you open a specific event, the date format isn’t localized at all. The Datepicker there isn’t using the already existing (default) translation, too. Best regards, Marko |
|
//Create the top right of invoice below header Adding this to uploads/espresso/gateway/invoice won’t do the trick, see here: http://www.elbe-erlebnistoerns.de/?download_invoice=true&attendee_id=171&r_id=38-516eef0e8c3b1 |
|
Try creating a file in your root dir called lang_test.php and put the following into it: <?php /* try different possible locale names for german as of PHP 4.3.0 */ $loc_de = setlocale(LC_ALL, 'de_DE.utf8', 'de_DE', 'de', 'ge'); echo "Preferred locale for german on this system is '$loc_de'"; ?><br> <?php echo strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978)); You should get the same output when you navigate to that file in your browser as when you go to here: http://eetesting.info/EE_branch/lang_test |
|
Okay, this here finally worked: But what wonders me, the now correctly localized date on the top-right of the pdf here: http://www.elbe-erlebnistoerns.de/?download_invoice=true&attendee_id=171&r_id=38-516eef0e8c3b1 Shall this always display the current date, or should it display the payment date, if the attendee already paid before he downloads the invoice? |
|
Btw: Familienforum is correct, even though i translated the strings in the invoice template.php long ago (so they are already into the current language files), they weren’t used. I only did a workaround by replacing the default strings with german ones… |
|
Thanks everybody for your input. I need some time to work through the suggestions and will update the thread with the result. It looks promising in any case. |
|
I did some more digging, and it looks like you should be able to replace the call to the date() function with one to the date_i18n() function to take advantage of the built in WordPress translation files based on locale. |
|
Hey Sidney, thanks for your research 🙂 From my perspective as a german user, it is a bug in Event Espresso *runs fast to hide behind a tree* I did a quick search in the Source of EE, and found that you were using the date_i18n function for some parts, like displaying the payment date when you manually enter Payments, and even the includes/functions/time_date.php is using this one, thats great. I would love if you could raise a ticket, so Event Espresso uses the date_i18n function for ALL displaying parts in near future version ;o) Best regards, Marko |
Hi Marko, Thanks for the feedback. |
|
Is this related to the inconsistent date handling Marko pointed out? then this happens
|
|
Hi Kris, I’m not following. What’s inconsistent with what you’re seeing in the screenshots? |
|
Sorry, first screenshot was the current time, the second was from registrations earlier that day. |
|
That may be more related to the current time as set by your server’s mysql time zone if it’s set to a different time zone. |
|
|
Finally played a little more with this. Looks like the PHP language pack is missing on my server. I’m trying to get my host company to install it. Still not sure what’s wrong with the umlauts, though. |
The support post ‘Invoice not translated and umlauts 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.