Support

Home Forums Event Espresso Premium EE&WPML how to respect the page language?

EE&WPML how to respect the page language?

Posted: June 10, 2014 at 3:22 am

Viewing 7 reply threads


Arnau Aloy

June 10, 2014 at 3:22 am

Hello,
I am doing a website with EE and WPML with 2 languages (catalan and spanish).
In order to make EE working with WPML, I have create categories and events for both languages. And I show the events not in a general page, but in categories pages, so each language show the realated events.

The problem comes when you click on an event to see the registration page, because it’s only shown in the main language page. So you see the event information in spanish, but the rest of the page (and menus) are only in catalan.

So, what can I do to show the spanish events registration page in spanish?

Thanks,

Arnau


Sidney Harrell

June 10, 2014 at 2:34 pm

I believe the problem is in plugins/event-espresso/espresso.php on line 285 and 308:

$lang = WPLANG;

If you were to change that to:

if (empty($_GET['lang'])) {
   $lang = WPLANG;
} else {
   $lang = $_GET['lang'] == 'es' ? 'es_ES' : WPLANG;
}

Be sure to change it at both lines 285 and 308. Make sure that you have both translation files in uploads/espresso/languages.


Arnau Aloy

June 13, 2014 at 2:51 am

Hi Sidney,

I have change it, but it is still not working. You can check in this link:
http://www.elyogaeduca.com/formaciones-bloque-1/?lang=es

The page is is spanish, but if you click on an event, the page will be in catalan (take attention in the web menu).

I upload the espresso language files to uploads/espresso/languages. But the files use to be in plugins/event-espresso/languages.

What else can I do?

Thanks,


Sidney Harrell

June 16, 2014 at 2:09 pm

Can you possibly send in login credentials to here and please be sure to include ftp information.


Arnau Aloy

June 20, 2014 at 11:20 am

Did you recive my credentials? I send it some days ago and I haven’t had any answer. Can you check it soon?

Thanks,


Lorenzo Orlando Caum

  • Support Staff

June 20, 2014 at 7:59 pm

Hi there,

Please share that temporary login information through the secure link below:

https://eventespresso.com/send-login-details/

The submit button for the form appears after you have answered “Yes” to the last question.


Lorenzo


Sidney Harrell

June 21, 2014 at 1:19 am

I have started working out how to get EE and WPML to work together. I can tell you right now that it is not an easy modification, and based on the volume of modifications required, I don’t think it is something that we are going to introduce into EE3. I will finish up and we will release it as a not-officially-supported modification that we will document how to do.
For example, I’ve posted the diff file that has the changes necessary for espresso.php: https://eventespresso.com/wiki/get-ee-play-nice-wpml/.


Sidney Harrell

June 23, 2014 at 5:05 pm

I took a slightly different track and applied all the changes to a branch off the development branch. That way we can test on it and merge it into the main trunk. I will email you a copy. Take note that you will need for each of the four main EE pages to have a version in each of the languages available on the site.

Viewing 7 reply threads

The support post ‘EE&WPML how to respect the page language?’ 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