Am 17.12.2009 21:47, schrieb A. Maza:
> Hello,
>
> is it somehow possible to retrieve a String array (or a list or
> something else) for multiple values in a properties file.
>
> I want to achieve something like this:
>
> I have a properties file with the following entry
>
> myKey=firstValue,secondValue,thirdValue,...
>
> in a component I would need to retrieve an array or collection for
> this in a similar approach than doing getLocalizer().getString(...)
> for a single-valued property.
>
> Of course, I could split the retrieved String every time accessing the
> property but this is not really an option.
>
> Is there any way to do this in wicket?
>
> thanks,
> andr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
users-unsubscribe@...
> For additional commands, e-mail:
users-help@...
>
This is not really a wicket task. It's more a programming problem.
String localizedString = Localizer.getString(key);
String[] values = localizedString.split(",");
Simple isn't it? You really want to decline this method? Another way
would be an enumeration of values
and i18n every single value. Could be hard if you have many different keys.
Cheers
Per
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...