There are other options like:

class MyLocalizer extends Localizer
{
    getCacheKey(xxxx) { if (xxx == yyy) return null} // dont return a cache
key for certain things
}

or

class MyLocalizer extends Localizer
{
       public String getString(final String key, final Component component,
final IModel model,
        final String defaultValue) throws MissingResourceException
    {
       // do your own stuff when you see its a key from the db:
       if (key.startswith(mydbkey))
      {
           // do you own stuff
       }
       else return super getString(key, component, model,defaultValue)

    }

}



On Thu, Jul 23, 2009 at 16:57, Mathias Nilsson
<wicket.program...@gmail.com>wrote:

> I  have used .properties and .xml files in all of my Wicket projects and it
> has worked great.
>
> However, quite often someone in the translation team wants to changes some
> text, image or something else that is localized in the properties files.
> Has
> anyone moved propeties to database with success? Something like
>
> component // The wicket component
> language // the language
> country // the country
> variant // the variant
> key // the key
> value // the actual value
>
>
> This could allow text to be changed thrue a web form. If the text was
> changed a callback to the resource loader to refresh the value.
> Can anyone lead me to the right path of implementing this. What classes
> should I look at? Has someone used something like this and is the
> .properties, .xml preferred over the database?
>
> It would be nice to not have to redeploy the whole application if just a
> text should be altered.
>
> // Mathias
>

Reply via email to