[follow-ups set to turbine-dev]
Stephane Bailliez <[EMAIL PROTECTED]> writes:
> 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}
This looks like a very nice extension to the LocalizationService.
Stephane, would you have any interest in submitting a patch to
Turbine's Localization service which provides this functionality?
Daniel