java - Localization in struts1 -


I have a project to support localization in the web application.

The project is a web application that provides services to its users

It is based on Stropes 1.2.

Requirement: In the JSP page the label can be controlled according to the user's priority, i.e. the login can vary according to the user.

The user can change the text of the label he / she wants to see.

How can I get it in Stash 1.2?

I know about struts I18n, but it's based on locale.

Am I thinking that to create a separate property file for each user?

Please help.

In a single asset file, you can have multiple resource IDs with different user names

ex:
title for user1.title = user1

user2.title = title for user2

and Dynamic keys in the Create Bean: The message depends on the user login.

struts-config.xml

  & lt; Message-resource parameter = "com.struts.MessageResource" key = "appResource" & gt; & Lt; / Message-resources & gt;   

In JSP:

  & lt;% string user name = (string) request.getAttribute ("username"); & Gt%; & Lt; Bean: Message bundle = "App Resource" key = "& lt;% = username". Title "%>" / & Gt;   

Rather than having separate labels for their preferences in relation to the user, you can control and use user preferences by creating your own templates. This way, you do not need to add a resource ID for every new user.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -