0 Replies Latest reply on Feb 10, 2010 7:38 PM by mladen babic

    Interpolator always uses default Locale in background process

    mladen babic Newbie

      Hi guys,


      Problem with Interpolator is that it use default Local when he is called in some background process(no other context except event and application scope). F.e.




       public Object getInterpolatedValue(String elvalue){
                      if(elvalue.startsWith("#{") && elvalue.endsWith("}")){
                              return Interpolator.instance().interpolate(elvalue);
                      }else {
                              return elvalue;
                      }
              }
      


      "elvalue" always is started with #{messages.somekey}. If user changes language f.e. germany, Interpolator evaluates value from messages file which is US in my situation. Is there any way to get right messages value by calling interpolate method?


      I use Seam 2.2.0, IceFaces 1.8.2 and JBoss AS 4.2.3.


      Best regards,
      MB