All the internationalization based on CSS for Webtop (at least with
the version I've used) requires you to recompile the app for a
different language. That's not too much of a problem, just generate
different versions of the app for different languages.

It would be good to have dynamic CSS support at runtime, but a
workaround could be to put all the strings into an LZO, with different
LZOs for different languages. That should work, shouldn't it? Of
course you are limited to SWF8 and DHTML then, since there's still no
support for LZOs with AS3 based runtimes, as far as I know.

2010/2/15 P T Withington <[email protected]>:
> I believe some use CSS styles to achieve internationalization, although 
> currently LZX does not support dynamically changing styles, so I'm not sure 
> exactly how this is handled.  Currently, styles need to be pre-processed by 
> the compiler.  Ideally, you would have your application server looking at the 
> browser request language preference and serve up different style sheets based 
> on that.  It may be that people are using a .jsp to do this kind of 
> dispatching.
>
> In theory, you would write something like:
>
> <!-- supply style sheet based on browser language -->
> <stylesheet>
>  i18ntext [label="hi"] { text: "hello" }
> </stylesheet>
>
> <class name="i18ntext" extends="text">
>  <attribute name="label" type="string" />
>  <attribute name="text" style="text" />
> </class>
>
> <i18ntext label="hi" />
>
>
> On 2010-02-15, at 08:34, cem sonmez wrote:
>
>> hi all
>> I am tring to do some operations about internationalization. And I am a bit
>> confused how to manage this.
>>
>> assume this xml :
>> *words.xml*
>> -----------------
>> <words>
>>    <word id="1" name="hi">
>>        <value>hello</value>
>>    </word>
>>    <word id="2" name="hi">
>>        <value>merhaba</value>
>>    </word>
>> </words>
>>
>> and dataset for it :
>>
>> <dataset name="dset" src="words.xml" />
>>
>> and i want to change any buttons text depend on the datapointer(for *id*) of
>> dset.
>> So, i am planning to do this via declaring a label attribute of the
>> components and implementing a setter for this attribute that is going to be
>> set by the datapointer value.
>> And to do this, i have to add these like lines to any component that i will
>> use.
>>
>> <attribute name="label" type="number" setter="setLabel(labelId)" />
>> <method name="setLabel" args="labelId" >
>>     this.label = labelId;
>>     this.setAttribute('text',canvas.getLabelName(this.label)()); <!--coming
>> from the datapointer as the value of the given id-->
>> </method>
>>
>> As a result :)
>>
>> To do this, I have to do this implementation in each component class
>> definition(i.e button, text, window). My question is : has anyone have an
>> idea how can i manage to do this in an easier way. just this way come to my
>> mind.
>>
>> Thanks in advance
>> Regards
>>
>> --
>> Cem SONMEZ
>
>
>

Reply via email to