No, resources loaded by WTKX use the current locale, as returned by java.util.Locale.getDefault(). Hard-coding a locale in the file would sort of defeat the purpose of localizing it. ;-)
Though you can't do it in WTKX, you can do it in code - though I'm curious to know why you would want to? On Aug 30, 2010, at 6:21 PM, Rodrigo Castillo wrote: > Sure. > > For example, following your code: > > <foo:MainWindow xmlns:wtkx="http://pivot.apache.org/wtkx" > xmlns:foo="com.foo"> > <wtkx:define> > <wtkx:include wtkx:id="loginDialog" src="login_dialog.wtkx" > resources="com.foo.LoginDialog"/> > </wtkx:define> > </MainWindow> > > is there a way to dictate what language should be used for > login_dialog.wtkx? for example the json file > com.foo.LoginDialog_cn.json or com.foo.LoginDialog_it.json > > Thanks again. > > On Mon, Aug 30, 2010 at 4:55 PM, Greg Brown <[email protected]> wrote: >> I'm sorry but I don't understand the question. Can you provide more context? >> G >> >> On Aug 30, 2010, at 4:55 PM, Rodrigo Castillo wrote: >> >>> Looks great. >>> >>> Just a couple questions before I check the src code, is it possible to >>> localize this attribute resource string/url (checking the api 1.5.1, >>> may be using some of the multiple language attribute in WTKXSerializer >>> class) ?, or will it just take the resource that you are coding in? >>> >>> Thanks a lot >>> >>> On Mon, Aug 30, 2010 at 12:18 PM, Greg Brown <[email protected]> wrote: >>>> An include with its own resource file is probably the best way to define >>>> your login dialog: >>>> >>>> <foo:MainWindow xmlns:wtkx="http://pivot.apache.org/wtkx" >>>> xmlns:foo="com.foo"> >>>> <wtkx:define> >>>> <wtkx:include wtkx:id="loginDialog" src="login_dialog.wtkx" >>>> resources="com.foo.LoginDialog"/> >>>> </wtkx:define> >>>> </MainWindow> >>>> >>>> On Aug 30, 2010, at 12:10 PM, Rodrigo Castillo wrote: >>>> >>>>> Hi, I'm trying to develop my own basic component library over pivot, >>>>> but I realize that, the only way to provide multi-language resources >>>>> to components is through wtkxserializer constructor, so if I have a >>>>> main window and I want to add a login "component" there are to ways to >>>>> complete this as I can see: merge both main windows and login >>>>> component json multi-language in only one file (we broke the component >>>>> encapsulation) that is should be passed to the "main wtkxserializer", >>>>> and loading login component with wtkx:include or wtkx:define, or each, >>>>> main window and login component have they own json multi-language file >>>>> and also each one should use a separate wtkxserializer and add >>>>> components by some programmatic way, witch is not so complicated but >>>>> it requires more control. >>>>> >>>>> Do you know if there is other way to accomplish this?, for example: >>>>> pass more than one json file to the wtkxserializer to avoid merge. >>>>> >>>>> Greetings. >>>> >>>> >> >>
