efan1
2003-04-24 20:34

java与模式的多例模式有一个case就是讲这个问题,那章可以下载。

iceant
2003-05-03 19:41

TO: banq

针对每个页面的 tag 做 cache?

也许可以吧~~

melodyliu
2003-05-09 07:54

我们在实际过程中也遇到了国际化的问题,我觉得国际化大致分为以下几个方面:

1。前台页面显示

2。后台组件

3。数据库存储

4。用户输入(本地化)

Dove
2003-05-11 08:44

记得在看JRun文档时,在说到本地化和国际化时,其解决方案之一是:

(小弟我e文不好,为了不影响大家理解,贴上原文了)

Using ResourceBundles

-----------------------------

ResourceBundles let you create a separate source file for each locale that you support in

your web applications. These files can contain text or other objects, such as images, that

are specific to each locale.

ResourceBundles are an abstract class in the java.util package and must be

implemented as one of the following subclasses:

• ListResourceBundle Use to store pointers to images or other objects in your

resource bundle. Uses Java classes to store resource information.

• PropertyResourceBundle Use to store text in your resource bundle. Uses

plain-text property files to store the raw data.

If your web application requires mostly localized text information, then it is easiest to use

property files (required by PropertyResourceBundle) rather than class files (required by

ListResourceBundles) to store your data.

JRun uses the following conventions to determine which resource bundle to fetch based

on the filename:

ClassName_languagecode_COUNTRYCODE.class

ClassName_languagecode_COUNTRYCODE.properties

The languagecode is mandatory except for the default system locale, such as en. The

COUNTRYCODE is optional.

When you invoke the getBundle method with the locale, JRun fetches the proper

resource class or file automatically. For example, if the locale is set to Japanese, JRun

fetches MyResources_ja.class or MyResources_ja.properties.

To use resource bundles in your web applications, you provide the client locale to the

ResourceBundle.getBundle method. Then you invoke the appropriate methods on the

resource bundle, as the following example shows:

...

ResourceBundle bundle =

ResourceBundle.getBundle(“Resources”,request.getLocale());

<html>
<head><title><%= bundle.getString("title") %></title></head>
<body>
<%-- Display all the contents based on ResourceBundle --%>
<h2><%= bundle.getString("hello_message") %></h2>
</body>
</html>
<p>

...

The contents of the resource bundle properties file are as follows:

title=Morning Greeting

hello_message=Good Morning

For an example, see SampleJDBCLoginModule in the

/samples/SERVER-INF/lib/jrun/samples/security directory.

bird
2003-05-11 14:53

1。前台页面显示

2。后台组件

3。数据库存储

4。用户输入(本地化)

-----------------------------------

第一点比较容易解决,使用Struts就可以

3、4这两个解决起来比较困难

不知道有没有成型的框架?