[Resolved] Problem with xLanguage and AJAX
I am using the plugin xLanguage to use English and Spanish in a blog. It is a really complete plugin, but I have a problem when I use an own widget based on the calendar widget. This widget has some literals like the name of the current month, the days of the week, and the previous and next months. I’ve been able to show them applying a filter, like for example:
$monthTitle = apply_filters('localization','December|Diciembre').' '.$year;
This code generates “December 2009” or “Diciembre 2009” depending on the language chosen, and it does correctly.
The problem comes when I click on “next month” or “previous month”. I guess it has something to do with the ajax process, because on that point I use jquery to change only the calendar and not all the page.
When the calendar is loaded by those clicks, the literals are not interpretated. It is shown “December|Diciembre 2009” in both languages.
I have tried using
<span lang='es'>instead of the pipe (|) and it’s still the same. I’ve also tried not using the filter, and taking the literal from the .po archive and then use the function _e(‘December’), but it does the same. It’s correct the first time the page is loaded, but when it loads only the calendar it fails.
If somebody has faced this problem or knows something that brings me any idea, I’ll appreciate it.
- The topic ‘[Resolved] Problem with xLanguage and AJAX’ is closed to new replies.