title: Spring Thymleaf internationalization does't getting messages from resources
body: <p>I have Spring web project.I want to implement internationalization with ThymLeaf.
  I have added messages file under resources. but i always get error on page like <code>??page.title_en_US??</code> or if pass <code>lang=en</code> in QueryString then it look like <code>??page.title_en??</code>.
  when is fetch messages in Controller by using MessageResource its returning all messages that is defined in Properties file :<code>messageSource.getMessage("page.title",null,locale)</code>
  My resource file structure is : 
                                   resources</p>
  
  <pre><code>                                       i18n/messages.properties
                                         i18n/messages_en.properties
  </code></pre>
  
  <p>Here is my Bean configuration: </p>
  
  <pre><code>    /**
   * This method is used for configure thymeleaf view resolver.
   * This view resolver have second priority.
   * */
  private ViewResolver thymeleafViewResolver() {
      ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver();
      thymeleafViewResolver.setViewClass(ThymeleafView.class);
      thymeleafViewResolver.setTemplateEngine(templateEngine());
  
      return thymeleafViewResolver;
  }
  
  
  /**
   * This method is used to configure template engine for thymeleaf.
   * */
  private SpringTemplateEngine templateEngine() {
      SpringTemplateEngine templateEngine = new SpringTemplateEngine();
      templateEngine.setTemplateResolver(templateResolver());
  
      return templateEngine;
  }
  
  /**
   * This method is used for configure the thymeleaf view configuration.
   * */
  private SpringResourceTemplateResolver templateResolver() {
      SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();
      //ServletContextTemplateResolver resolver = new ServletContextTemplateResolver();
      //ClassLoaderTemplateResolver resolver = new ClassLoaderTemplateResolver();
      resolver.setApplicationContext(applicationContext);
      resolver.setPrefix("/WEB-INF/views/templates/");
      resolver.setSuffix(".html");
      resolver.setTemplateMode(TemplateMode.HTML);
  
      resolver.setCharacterEncoding("UTF8");
  
      resolver.setOrder(2);
      return resolver;
  }
  
  
  @Override
  public void configureDefaultServletHandling(
          DefaultServletHandlerConfigurer configurer) {
      configurer.enable();
  }
  
  @Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
      registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
  }
  
  @Bean
  public LocaleResolver localeResolver() {
      SessionLocaleResolver slr = new SessionLocaleResolver();
      slr.setDefaultLocale(Locale.US);
      return slr;
  }
  
  
  @Bean
  public MessageSource messageSource() {
      ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
      messageSource.setBasename("i18n/messages");
      messageSource.setDefaultEncoding("UTF-8");
      // messageSource.setCacheSeconds(3600); //refresh cache once per hour
      return messageSource;
  }
  @Bean
  public LocaleChangeInterceptor localeChangeInterceptor() {
      LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
      lci.setParamName("lang");
      return lci;
  }
  @Override
  public void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(localeChangeInterceptor());
  }
  </code></pre>