Re: I18N in seperate files
List for Users of Carlsbad Cubes' Technologies and Products <[email protected]> Wed, 14 Sep 2005 07:45:54 +0200
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Organization | http://freemail.web.de/ |
| Message-ID | <[email protected]> |
List for Users of Carlsbad Cubes' Technologies and Products <Forum@carlsbad=
cubes.com> schrieb am 13.09.05 18:18:40:
> =
> Hi,
> =
> We have the same issue. We've got quite a big application so to keep
> it maintainable
> we split it in logical modules and we have one locale file per module like
> module1_en.properties, module2_en.properties ... etc. =
> To make a reuse of common translations (like "ok", "cancel" ) we have
> common_en.properties.
> So what we tried to do with swixml was something like this
> =
> <frame bundle=3D"module1">
> <panel it=3D"mainPanel">
> ...
> </panel>
> <panel it=3D"okCancelPanel" bundle=3D"common">
> ...
> </panel>
> </frame>
> =
> But it didn't work.
> So I wonder if swixml supports this construction at all.
I looked into the Parser-class of swixml and this attribute is only support=
ed for the root-Element:
getSwing( processCustomAttributes( jdoc.getRootElement() ), container );
It is not that easy to change this because the localizer (responsible to lo=
calize attributes) is a static one, which is not easy changable either.
So, to solve this, you may either write your own resourcebundle which more =
ore less combines the separate resource bundles of your own (not very elega=
nt) or to combine your resource bundles through your build process (not ver=
y elegant too). Vitali, you may only need to merge your commom properties i=
nto the specific one, which resolves not the problem of nested containers, =
though...
Yours,
Frank
> =
> Thanks,
> Vitali
> =
> 2005/9/11, List for Users of Carlsbad Cubes' Technologies and Products
> <[email protected]>:
> > =
> > =
> > List for Users of Carlsbad Cubes' Technologies and Products <Forum@carl=
sbadcubes.com> schrieb am 09.09.05 19:31:37:
> > >
> > > Hi,
> > >
> > > > Do you want to split (e.g.) the german language property file
> > > > into more than one file?
> > >
> > > Yes, this is that i mean. It is maintainable und concise.
> > =
> > Hm, I did not try that nor can I try this at the moment, but did you sp=
ecify different "bundle"-attributes in your panels/frames/...? Maybe this l=
eads to different problems, though...
> > =
> > =
> > >
> > > > How is your "I18N-File" named?
> > >
> > > My files ar name "mainFrame.properties", "mainFrame_de.properties" an=
d "customerPanel.properties", "customerPanel_de.properties".
> > =
> > Sounds ok.
> > =
> > >
> > > I read the given url, but i have no idea how i can it use in swixml-f=
iles. It's an understanding problem for me.
> > =
> > Maybe, but maybe it is also a problem with Swixml -- it is not meant to=
have different resource bundles per locale. I'm not sure about the maintan=
ance -- either you have a lot of small property files with few properties i=
n them or you have few property files with a lot of properties in them. For=
me, it is more convenient to have one property-file per locale, because it=
allows re-use of properties as well.
> > =
> > =
> > Yours,
> > =
> > Frank
> > > ________________________
> > > Bj=F6rn Schulz
> > > -----------------------------------------------------------------
> > > _______________________________________________
> > > Forum mailing list
> > > [email protected]
> > > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
> > >
> > =
> > =
> > =
> > _______________________________________________
> > Forum mailing list
> > [email protected]
> > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
> >
> =
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com