Monday, March 15, 2010

I18N with Seam


Define the available locales in faces-config.xml.


        com.sun.facelets.FaceletViewHandler
        
            sv
            sv            
        
    

Then when you need to present for example a date you can just the locale selector like

@In
private LocaleSelector localeSelector;                 

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("d MMMM yyyy", localeSelector.getLocale());

No comments:

Post a Comment