> -----Original Message-----
> From: Jon Stevens [mailto:[EMAIL PROTECTED]]

> Turbine also has a LocalizationService which wraps around 
> ResourceBundles to provide what you need as well.

I extended the Localization class to include additional methods for
formatting message from resource bundles.

String getString(String name, String lang , Collection arguments)
String getString(RunData data, String name , Collection arguments)
String getString(String name, Collection arguments)

setting it as an application tool syntax is:

// this one will use the accept-language header to determine the language
$localization.getString($data, "welcome.msg", [$user.name, $date])

# resource bundle:
welcome.msg= Welcome {0} ! Today is {1,date} and time is {1,time}

# french
welcome.msg= Bienvenue {0} ! Nous sommes le {1,date}, il est actuellement
{1,time}

Stephane

Reply via email to