-
1. Re: rich:fileUpload - internationalization method
ilya_shaikovsky Apr 16, 2008 1:03 PM (in response to j-pro)As for all our components you should define this properties in application bundle or in the packaged bundle with proper name.
-
2. Re: rich:fileUpload - internationalization method
j-pro Apr 16, 2008 1:59 PM (in response to j-pro)"ilya_shaikovsky" wrote:
As for all our components you should define this properties in application bundle or in the packaged bundle with proper name.
Ilya, would you be so kind to show me small example please? I just have some knowledge of using bundles I've described above and don't know anything YET about what's an application bundle, or "packaged bundle with proper name". Maybe just don't understand, sorry for that.
Thanks one more time. -
3. Re: rich:fileUpload - internationalization method
ilya_shaikovsky Apr 17, 2008 9:06 AM (in response to j-pro)certainly, just create property file in your classpath and define it in faces config like:
<message-bundle>bundleName</message-bundle>
-
4. Re: rich:fileUpload - internationalization method
j-pro Apr 17, 2008 10:14 AM (in response to j-pro)Thanks, ilya_shaikovsky, that helped, now I know how to do it.
I've even made it for my language bundle by just adding:<message-bundle>lan</message-bundle>
So it works now. Thank you very much! -
5. Re: rich:fileUpload - internationalization method
j-pro Apr 17, 2008 10:49 AM (in response to j-pro)But what should I do to make these labels change like all my other text changes when I switch the language by changing the locale from "en" to "ru" for example?
I've put all labels in both of lan_ru.properties, and lan_en.properties and defined it in faces-config... but no way... -
6. Re: rich:fileUpload - internationalization method
andrei_exadel Apr 17, 2008 11:02 AM (in response to j-pro)J-Pro,
FileUpload has some attributes where you can define you custom label.
To provide i18 you can use the following example:
...
// loadNundle
<fileUpload ... addControlLabel="#{youBundleName.youAddLabel}" />
The other way is create you bundle:
1. Create package 'org.richfaces.renderkit' in you application.
2. Put there 'fileUpload.properties' file with parameters described in spec. -
7. Re: rich:fileUpload - internationalization method
j-pro Apr 17, 2008 4:15 PM (in response to j-pro)"andrei_exadel" wrote:
J-Pro,
FileUpload has some attributes where you can define you custom label.
To provide i18 you can use the following example:
...
// loadNundle
<fileUpload ... addControlLabel="#{youBundleName.youAddLabel}" />
This way seems to be the thing I need. But if I understood the dev guide right, then there are attributes only for a few controls in a file upload:You could define labels of the component controls with the help of "addControlLabel" ,
"clearAllControlLabel" , "clearControlLabel" , "stopEntryControlLabel" , "uploadControlLabel"
attributes.
There are some more if I use bundles or fileUpload.properties.
For example, addControlLabel is for RICH_FILE_UPLOAD_ADD_LABEL, etc., but what attribute should I use for RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE?"andrei_exadel" wrote:
The other way is create you bundle:
1. Create package 'org.richfaces.renderkit' in you application.
2. Put there 'fileUpload.properties' file with parameters described in spec.
That way works, but again - only for one type of labels?(is it possible to define fileUpload_ru.properties and fileUpload_en.properties?)
P.S.: By the way - what does mean "i18" in "To provide i18"? :) -
8. Re: rich:fileUpload - internationalization method
ronanker Apr 18, 2008 3:29 AM (in response to j-pro)i18 or i18n means internationalization
also l10n means localization
the number corresponds to the number of letters between first and last character of the word... -
9. Re: rich:fileUpload - internationalization method
andrei_exadel Apr 18, 2008 7:30 AM (in response to j-pro)That way works, but again - only for one type of labels?(is it possible to define fileUpload_ru.properties and fileUpload_en.properties?)
Yes. Try it.
In this case location will be get from request header according to user's location.
Also you can manually set up determined location for fileupload using 'locale' attribute. -
10. Re: rich:fileUpload - internationalization method
j-pro Apr 18, 2008 9:55 AM (in response to j-pro)"andrei_exadel" wrote:
That way works, but again - only for one type of labels?(is it possible to define fileUpload_ru.properties and fileUpload_en.properties?)
Yes. Try it.
In this case location will be get from request header according to user's location.
Also you can manually set up determined location for fileupload using 'locale' attribute.
YES! :) It works. I set the locale with appropriate fileUpload attribute. I use changed locale variable from my MUI managed bean. It works.
Thank you very much for your time and help, Andrei, you helped me much.