Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6543491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:12+00:00 2026-05-25T11:21:12+00:00

Currently my team is developing a web 2.0 application in java and we are

  • 0

Currently my team is developing a web 2.0 application in java and we are using JSF for the presentation layer. We are beginning with the presentation layer so we have yet to add the business and data layer.

Technologies we use:
– JSF (Mojarra 2.0.3)
– Primefaces 2.1 (JSF library of components)
– Spring Security 3.0.5
– jBoss 5.1

I was asked to add locale support to the app. So I configured the faces-config.xml file as follows:

<application>
    <locale-config>
        <default-locale>en</default-locale>
        <supported-locale>pt</supported-locale>
        <supported-locale>en</supported-locale>
        <supported-locale>es</supported-locale>
    </locale-config>
    <message-bundle>
        com.<company>.<product>.i18n.MessageBundle
    </message-bundle>
</application>

I created the MessageBundle suffixed files and deployed the app. I read that there are 3 criteria that JSF uses to choose the locale:
1) match between request locales (Accept-Language request header) and the supported locales
2) application default locale defined in the faces config file
3) JVM default locale

When I try to change the language in my browser options the app does not change the locale. Even if I only configure one language other than the default one. Am I missing something here? Is this what to expect or in fact it should change contents when I change the browser language (provided it is a supported language)?

I would very much appreciate any tips or at least a pointer as to where I could find the answer seen as I have googled already for it with no luck.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:21:13+00:00Added an answer on May 25, 2026 at 11:21 am

    I eventually found out what the problem was. Somewhere inside the code there was a locale declaration, for that reason, no matter which language I chose in my browser, the presented language would always be the same. Once I removed that declaration everything started working as supposed to.

    I’m sorry for not posting this sooner.

    Also I’d like to thank you all for your tips. Even though the answer was not in them, I learned a lot along the way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am part of a team that is developing a web application using a
The application my team is currently developing has a DLL that is used to
We have a small 3 developer team that is currently using Subversion for our
I am working with a team of programmers developing web applications for a Java
I am currently developing a Web Site (not a Web Application) in VS2008. I
I'm developing a web application for a company which I work for. My team
I have joined a team developing an ASP.NET MVC version 1 application. I run
I'm part of a team developing ASP.Net applications using Scrum. We currently use TFS
I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile
We are working on developing a Java EE based application. Our application is Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.