multi language problem

You need to be logged in to post messages in the forums. New users may register here.

Sascha Frinken

Member since:
09 January 2008

Posts: 3

Monday 19 April 2010 5:57:12 am

Hi,

I am having some small problems getting the right language of an object from the ajax server.
I have two siteaccesses, de (german) and en (english),

I am using the ezjsctemplate::<mytemplate> function. If I call the script via it's uri:

http://example.com/en/ezjscore/call/ezjsctemplate::<mytemplate>

I get the english version of the node I fetched inside the template.
If I call

http://example.com/en/ezjscore/call/ezjsctemplate::<mytemplate>

I get the german version. But if I am using the yui3 function:

































Up

André R.

Member since:
14 January 2008

Posts: 145

Monday 19 April 2010 3:20:35 pm

Hi!

No, this should have been mentioned in doc and examples.
How to deal with this is basically to do like in ezoe, append the current language to the call, in ezoe case:
'ezoe::i18n::'|concat( $language ) *

But in your case:
{ezscript_require(array( 'ezjsc::yui3', 'ezjsc::yui3io::'|concat( $language ) ) )}

yui3io does not take any arguments, so will ignore the $language, but it will be part of the cache hash making the cache unique pr language




* http://svn.projects.ez.no/ezoe/tr...ent/datatype/edit/ezxmltext_ezoe.tpl

eZ Online Editor 5.1: http://projects.ez.no/ezoe || eZJSCore 1.1(Ajax): http://projects.ez.no/ezjscore || eZSearch++(better search results): http://projects.ez.no/ezsearchpro
@: http://twitter.com/andrerom

Up

Sascha Frinken

Member since:
09 January 2008

Posts: 3

Tuesday 20 April 2010 8:20:05 am

Hi André,

first of all thank You very much - works like a charm.

rgds.

Sascha
Up

You need to be logged in to post messages in the forums. New users may register here.