开发者

JSF 2.0 internationalization without faces-config

I want to provide different languages in my jsf-application.

I've found that expl开发者_JS百科anation and I wonder if I can also do that without faces-config (because I don't use one since jsf2 has annotations).

Can I do it another way? Or do I have to create a faces-config.xml ?

Thank you for help :-) cheers


Create a minimal faces-config.xml holding few conf related to i18n and go ahead also have a look at jsf-2-internationalization-example


I am afraid that you cannot avoid faces-config.xml. However, that is not such a big deal.

If you are using Eclipse you can install JBoss Tools. Then you can simply right click with your mouse on a project -> Configure -> Add JSF capabilities. It will allow you to easy externalize strings from your JSF page - simply select string that you want to be localized, right click and choose "Externalize Strings...". It will allow you to set up (create) properties file automatically. It also suggest translation variable and resource key while you type, very nice feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜