Lang

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Lang

Deborah White
I have this:

<s:url value="consumerComplaintSaveEsp.action?lang=es" encode="true"/>

It doesn't seem to like lang=es

Help?

CONFIDENTIALITY NOTICE: This communication with its contents may contain confidential and/or legally privileged information. It is solely for the use of the intended recipient(s). Unauthorized interception, review, use or disclosure is prohibited and may violate applicable laws including the Electronic Communications Privacy Act. If you are not the intended recipient, please contact the sender and destroy all copies of the communication.
Reply | Threaded
Open this post in threaded view
|

Re: Lang

Martin Gainty
Buenas Noches

your implementation of AbstractBeanProvider needs to supply struts-messages_es.properties

in WEB-INF/classes/org/apache/struts2 folder


if you have no impl of AbstractBeanProvider use org.apache.struts2.config.DefaultBeanSelectionProvider

public void register(ContainerBuilder builder, LocatableProperties props) {

...find your way to LocalizedTextUtil.addDefaultResourceBundle to add in your _es properties:


LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages_es");
loadCustomResourceBundles(props);

in org/apache/struts2/default.properties point struts.custom.i18n.resources to your properties:
struts.custom.i18n.resources=struts_messages_es

i will leave org/apache/struts2/struts-messages_es.properties as ejercicio de traducción

Un Saludo desde Nueva Inglaterra
Martín
______________________________________________


________________________________
From: Deborah White <[hidden email]>
Sent: Friday, February 9, 2018 12:47 PM
To: Struts Users Mailing List
Subject: Lang

I have this:

<s:url value="consumerComplaintSaveEsp.action?lang=es" encode="true"/>

It doesn't seem to like lang=es

Help?

CONFIDENTIALITY NOTICE: This communication with its contents may contain confidential and/or legally privileged information. It is solely for the use of the intended recipient(s). Unauthorized interception, review, use or disclosure is prohibited and may violate applicable laws including the Electronic Communications Privacy Act. If you are not the intended recipient, please contact the sender and destroy all copies of the communication.
Reply | Threaded
Open this post in threaded view
|

Re: Lang

Yasser Zamani-2
In reply to this post by Deborah White


On 2/9/2018 9:17 PM, Deborah White wrote:
> I have this:
>
> <s:url value="consumerComplaintSaveEsp.action?lang=es" encode="true"/>
>
> It doesn't seem to like lang=es
>
> Help?

Do you look for something like below described at [1]?

<s:url action="consumerComplaintSaveEsp"
var="consumerComplaintSaveEspLinkES">
    <s:param name="request_locale">es</s:param>
</s:url>

[1]
https://struts.apache.org/getting-started/message-resource-files.html#internationalization-i18n


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]