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 8106701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:32:33+00:00 2026-06-06T00:32:33+00:00

Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files

  • 0

Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files for languages. They are being corectly copied to web-inf folder and the codes exist within properties file …

Here is the ide showing everything, please help me. I have copied the set up from another project I have done that works fine. I have tried creating a load of different message files, but its not picking anything up … pic shows web.xml, spring-servlet.xml, and directory structure.

This shows everything, I can't see what I am missing

Edit
If I add the bean definition to applicationContext instead of spring-servlet it works .. ?

  • 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-06-06T00:32:36+00:00Added an answer on June 6, 2026 at 12:32 am

    I’ll go for my try:

    If the file is located under the WEB-INF/classes directory, try :

    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="WEB-INF/classes/messages" />
    </bean>
    

    And the name of the file should be either :

    • messages.properties
    • messages_en.properties
    • messages_en_GB.properties

    Edit – Final try !

    What about this way of writing the configuration, I smell sthg here after your last comment:

    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="classpath:messages" />
        <property name="defaultEncoding" value="UTF-8" />
    </bean>
    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
        <property name="defaultLocale" value="en" />
    </bean>
    
    <mvc:interceptors>
        <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
            <property name="paramName" value="lang" />
        </bean>
    </mvc:interceptors>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been attempting to get the MySQL Embedded Library working in my C#
Im attempting to get a block of text from a file I have already
I'm attempting to get rid of an app's HTML files and store their contents
I am attempting to get rails routes paths via nested resources. I have looked
I'm attempting to get a Spring 3.0.2 WebMVC project running with the new annotated
I'm attempting to learn Spring MVC but have been spoiled by Grails. While I
I have a JAX-RPC web service that I am attempting to consume using Spring.
I have been trying to get a 2-way ssl/https proxy working with Camel. I
I'm attempting to get my first ASP.NET web page working on windows using Mono
I'm attempting to get some of the more interesting Windows Aero effects working in

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.