|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
I18N in seperate filesHi Group, i read sample code number 6 and try to split "swix.properties" into seperate files. But it didn't work. I create a new folder and put a new I18N-File into. The same i do it with xml-files and it work well (include-tag). In my xml-file i tried to access on this file like: <doc id="content" bundle="locale.content.newI18N"> <panel Layout="flowlayout" include="xml/content/i18nTest.xml#newContent"/> </doc> My questions: How can i split it in seperate files? How must use it in xml-files? thx for help ________________________ Björn Schulz Student (Sorry my english is terrible, but i work at it.) _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesList for Users of Carlsbad Cubes' Technologies and Products wrote:
> > Hi Group, > > i read sample code number 6 and try to split "swix.properties" into > seperate files. But it didn't work. What do you mean by "separate files"? The idea is to have only one file per locale, e.g. a file for german language, english language and italian. Do you want to split (e.g.) the german language property file into more than one file? > I create a new folder and put a new I18N-File into. The same i do it > with xml-files and it work well (include-tag). How is your "I18N-File" named? You may have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/util/PropertyResourceBundle.html to understand how the resolve mechanism of swixml works. Frank _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesList for Users of Carlsbad Cubes' Technologies and Products wrote:
> List for Users of Carlsbad Cubes' Technologies and Products wrote: > >>Hi Group, >> >>i read sample code number 6 and try to split "swix.properties" into >>seperate files. But it didn't work. > > > What do you mean by "separate files"? The idea is to have only one file > per locale, e.g. a file for german language, english language and > italian. Ok, this is somewhat vague. I mean, you need to have one file for german, another for english and still another for italian. Frank _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesHi, > 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. > How is your "I18N-File" named? My files ar name "mainFrame.properties", "mainFrame_de.properties" and "customerPanel.properties", "customerPanel_de.properties". I read the given url, but i have no idea how i can it use in swixml-files. It's an understanding problem for me. ________________________ Björn Schulz _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesList for Users of Carlsbad Cubes' Technologies and Products <Forum@...> 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 specify different "bundle"-attributes in your panels/frames/...? Maybe this leads to different problems, though... > > > How is your "I18N-File" named? > > My files ar name "mainFrame.properties", "mainFrame_de.properties" and "customerPanel.properties", "customerPanel_de.properties". Sounds ok. > > I read the given url, but i have no idea how i can it use in swixml-files. 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 maintanance -- either you have a lot of small property files with few properties in 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örn Schulz > ----------------------------------------------------------------- > _______________________________________________ > Forum mailing list > Forum@... > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesHi,
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="module1"> <panel it="mainPanel"> ... </panel> <panel it="okCancelPanel" bundle="common"> ... </panel> </frame> But it didn't work. So I wonder if swixml supports this construction at all. Thanks, Vitali 2005/9/11, List for Users of Carlsbad Cubes' Technologies and Products <Forum@...>: > > > List for Users of Carlsbad Cubes' Technologies and Products <Forum@...> 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 specify different "bundle"-attributes in your panels/frames/...? Maybe this leads to different problems, though... > > > > > > > How is your "I18N-File" named? > > > > My files ar name "mainFrame.properties", "mainFrame_de.properties" and "customerPanel.properties", "customerPanel_de.properties". > > Sounds ok. > > > > > I read the given url, but i have no idea how i can it use in swixml-files. 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 maintanance -- either you have a lot of small property files with few properties in 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örn Schulz > > ----------------------------------------------------------------- > > _______________________________________________ > > Forum mailing list > > Forum@... > > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > > > > > > _______________________________________________ > Forum mailing list > Forum@... > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesList for Users of Carlsbad Cubes' Technologies and Products <Forum@...> 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="module1"> > <panel it="mainPanel"> > ... > </panel> > <panel it="okCancelPanel" bundle="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 supported for the root-Element: getSwing( processCustomAttributes( jdoc.getRootElement() ), container ); It is not that easy to change this because the localizer (responsible to localize 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 elegant) or to combine your resource bundles through your build process (not very elegant too). Vitali, you may only need to merge your commom properties into 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 > <Forum@...>: > > > > > > List for Users of Carlsbad Cubes' Technologies and Products <Forum@...> 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 specify different "bundle"-attributes in your panels/frames/...? Maybe this leads to different problems, though... > > > > > > > > > > > How is your "I18N-File" named? > > > > > > My files ar name "mainFrame.properties", "mainFrame_de.properties" and "customerPanel.properties", "customerPanel_de.properties". > > > > Sounds ok. > > > > > > > > I read the given url, but i have no idea how i can it use in swixml-files. 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 maintanance -- either you have a lot of small property files with few properties in 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örn Schulz > > > ----------------------------------------------------------------- > > > _______________________________________________ > > > Forum mailing list > > > Forum@... > > > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > > > > > > > > > > > _______________________________________________ > > Forum mailing list > > Forum@... > > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com > > > > _______________________________________________ > Forum mailing list > Forum@... > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate filesList for Users of Carlsbad Cubes' Technologies and Products <Forum@...> schrieb am 14.09.05 07:49:29: > > > > List for Users of Carlsbad Cubes' Technologies and Products <Forum@...> 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="module1"> > > <panel it="mainPanel"> > > ... > > </panel> > > <panel it="okCancelPanel" bundle="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 supported for the root-Element: > getSwing( processCustomAttributes( jdoc.getRootElement() ), container ); > > It is not that easy to change this because the localizer (responsible > to localize attributes) is a static one, which is not easy changable either. > Ok, it was about one hours work -- it works for a simple example but has to be cleaned up. Perhaps I get completed this week... To assign multiple bundle files (separated by "," or whatever) seems to be a good idea too, what do you think? Frank _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
|
|
Re: I18N in seperate files>
> Ok, it was about one hours work -- it works for a simple example but has to be cleaned up. Perhaps I get completed this week... To assign multiple bundle files (separated by "," or whatever) seems to be a good idea too, what do you think? > It sound like a reasonable intermediate solution. for the long term however I think still would be nice to have full support for the nested bundles. the point is that the example I provided in previous email is a simplified version. in reality we keep okCancelPanel in a separate swixml descriptor and include it as <panel include="fragments.xml#okCancelPanel" ... />. In this case it becomes not so obvious if we specify extra bundle (via comma) for components which are in different descriptor file. But in any case specifying multiple bundles via comma is much better then having to combine bundles as part of the build procedure. Thanks for your efforts. Vitali _______________________________________________ Forum mailing list Forum@... http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com |
| Free embeddable forum powered by Nabble | Forum Help |