How to use resource bundle in attributes
Hi, how can a use internationalized text strings stored in a resource bundle as values of attributes? For example: I know, this will not work, but how can it be done? Ralf. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Use jstl! On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: Hi, how can a use internationalized text strings stored in a resource bundle as values of attributes? For example: I know, this will not work, but how can it be done? Ralf. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Could you give a short example of how this can be done with JSTL or point me to an example? I looked into the Java Web Services Tutorial, but the chapter about internationalization with JSTL only describes the use of internationalized strings in the body of a tag (e.g. ). Ralf. Am Montag, 3. Mai 2004 15:37 schrieb Nathan Maves: > Use jstl! > > On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: > > Hi, > > > > how can a use internationalized text strings stored in a resource > > bundle as > > values of attributes? > > > > For example: > > > > > > > > I know, this will not work, but how can it be done? > > > > Ralf. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
I am not 100% sure but I believe that you just use the tag. Just use something like... if you need to send parameters just put them in the body of the tag. Nathan On May 3, 2004, at 8:44 AM, Ralf Schneider wrote: Could you give a short example of how this can be done with JSTL or point me to an example? I looked into the Java Web Services Tutorial, but the chapter about internationalization with JSTL only describes the use of internationalized strings in the body of a tag (e.g. ). Ralf. Am Montag, 3. Mai 2004 15:37 schrieb Nathan Maves: Use jstl! On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: Hi, how can a use internationalized text strings stored in a resource bundle as values of attributes? For example: I know, this will not work, but how can it be done? Ralf. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
But this is not the way I want to use it. This way, I could use it to put a translated text into the body of a tag like But how can I use the translated text as an attribute value as written before? Ralf. Am Montag, 3. Mai 2004 17:12 schrieb Nathan Maves: > I am not 100% sure but I believe that you just use the > tag. > > Just use something like... > > > > > if you need to send parameters just put them in the body of the tag. > > > > > > > Nathan > > On May 3, 2004, at 8:44 AM, Ralf Schneider wrote: > > Could you give a short example of how this can be done with JSTL or > > point me > > to an example? > > > > I looked into the Java Web Services Tutorial, but the chapter about > > internationalization with JSTL only describes the use of > > internationalized > > strings in the body of a tag (e.g. ). > > > > Ralf. > > > > Am Montag, 3. Mai 2004 15:37 schrieb Nathan Maves: > >> Use jstl! > >> > >> On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: > >>> Hi, > >>> > >>> how can a use internationalized text strings stored in a resource > >>> bundle as > >>> values of attributes? > >>> > >>> For example: > >>> > >>> > >>> > >>> I know, this will not work, but how can it be done? > >>> > >>> Ralf. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ## Ralf Schneider ## Fürstenallee 14 - 34454 Bad Arolsen ## Tel. +49-5691-625994 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Ralf Schneider wrote: how can a use internationalized text strings stored in a resource bundle as values of attributes? Hi Ralf Have you tried I use the 'titleKey' attribute like this on 'html:submit' buttons. -- bOOyah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Sorry how about this.. I am not sure what the title attribute tag does. Since it is a struts only attribute you will have to use the struts el tags to access the var userNameTitle that is now in scope. in web.xml struts/html-el /WEB-INF/struts-html-el.tld make sure you have the struts-el.jar in your classpath in your jsp <%@ taglib uri="struts/html-el" prefix="html" %> then use something like (never done this some I am really not sure how) On May 3, 2004, at 9:38 AM, Ralf Schneider wrote: But this is not the way I want to use it. This way, I could use it to put a translated text into the body of a tag like But how can I use the translated text as an attribute value as written before? Ralf. Am Montag, 3. Mai 2004 17:12 schrieb Nathan Maves: I am not 100% sure but I believe that you just use the tag. Just use something like... if you need to send parameters just put them in the body of the tag. Nathan On May 3, 2004, at 8:44 AM, Ralf Schneider wrote: Could you give a short example of how this can be done with JSTL or point me to an example? I looked into the Java Web Services Tutorial, but the chapter about internationalization with JSTL only describes the use of internationalized strings in the body of a tag (e.g. ). Ralf. Am Montag, 3. Mai 2004 15:37 schrieb Nathan Maves: Use jstl! On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: Hi, how can a use internationalized text strings stored in a resource bundle as values of attributes? For example: I know, this will not work, but how can it be done? Ralf. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ## Ralf Schneider ## Fürstenallee 14 - 34454 Bad Arolsen ## Tel. +49-5691-625994 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
Yes! That's exactly what I was looking for. Thanks a lot! I missed this attribute when looking through the endless list of attributes of the HTML taglib. Ralf. Am Montag, 3. Mai 2004 18:28 schrieb bOOyah: > Ralf Schneider wrote: > > how can a use internationalized text strings stored in a resource bundle > > as values of attributes? > > > > > > Hi Ralf > > Have you tried > > > > I use the 'titleKey' attribute like this on 'html:submit' buttons. -- ## Ralf Schneider ## Fürstenallee 14 - 34454 Bad Arolsen ## Tel. +49-5691-625994 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use resource bundle in attributes
As a work-around I made it this way: ... But what I was looking for was the suggestion bOOyah made in this thread. You can simply use the titleKey attribute instead of title. titleKey uses the given text as a key for the resource file. Thanks for your help, Ralf. Am Montag, 3. Mai 2004 18:29 schrieb Nathan Maves: > Sorry > > how about this.. > > > > I am not sure what the title attribute tag does. Since it is a struts > only attribute you will have to use the struts el tags to access the > var userNameTitle that is now in scope. > > in web.xml > > > struts/html-el > /WEB-INF/struts-html-el.tld > > > make sure you have the struts-el.jar in your classpath > > in your jsp > > > <%@ taglib uri="struts/html-el" prefix="html" %> > > then use something like (never done this some I am really not sure how) > > > > On May 3, 2004, at 9:38 AM, Ralf Schneider wrote: > > But this is not the way I want to use it. This way, I could use it to > > put a > > translated text into the body of a tag like > > > > > > > > But how can I use the translated text as an attribute value as written > > before? > > > > Ralf. > > > > Am Montag, 3. Mai 2004 17:12 schrieb Nathan Maves: > >> I am not 100% sure but I believe that you just use the > >> tag. > >> > >> Just use something like... > >> > >> > >> > >> > >> if you need to send parameters just put them in the body of the tag. > >> > >> > >> > >> > >> > >> > >> Nathan > >> > >> On May 3, 2004, at 8:44 AM, Ralf Schneider wrote: > >>> Could you give a short example of how this can be done with JSTL or > >>> point me > >>> to an example? > >>> > >>> I looked into the Java Web Services Tutorial, but the chapter about > >>> internationalization with JSTL only describes the use of > >>> internationalized > >>> strings in the body of a tag (e.g. ). > >>> > >>> Ralf. > >>> > >>> Am Montag, 3. Mai 2004 15:37 schrieb Nathan Maves: > Use jstl! > > On May 3, 2004, at 6:51 AM, Ralf Schneider wrote: > > Hi, > > > > how can a use internationalized text strings stored in a resource > > bundle as > > values of attributes? > > > > For example: > > > > > > > > I know, this will not work, but how can it be done? > > > > Ralf. > >>> > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > > ## Ralf Schneider > > ## Fürstenallee 14 - 34454 Bad Arolsen > > ## Tel. +49-5691-625994 > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ## Ralf Schneider ## Fürstenallee 14 - 34454 Bad Arolsen ## Tel. +49-5691-625994 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]