Sven
Sven

Reputation: 6338

JSF 2.0 internationalization without faces-config

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

I've found that explanation 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

Upvotes: 1

Views: 2244

Answers (2)

Paweł Dyda
Paweł Dyda

Reputation: 18662

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.

Upvotes: 1

Jigar Joshi
Jigar Joshi

Reputation: 240870

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

Upvotes: 5

Related Questions