Re: Problem with Czech language

Splash Forums PrettyTime Users Problem with Czech language Re: Problem with Czech language


Hi There,

Yes, this is possible, but it hasn’t been added to the translation guide yet because we haven’t gotten much feedback on the API – you could help us out by being among the first to try it!

Basically, the concept is that you need to implement the TimeFormatProvider interface in your ResourceBundle.

* Produces time formats. Currently only to be used on Resource bundle implementations when used in
* {@link ResourcesTimeFormat} instances..
* @author <a href="">Lincoln Baxter, III</a>
public interface TimeFormatProvider
* Return the appropriate {@link TimeFormat} for the given {@link TimeUnit}
public TimeFormat getFormatFor(TimeUnit t);

This allows you to handle formatting uniquely for each unit, and thusly, also allows you to do do things like supply a different name for past, future, plural, or singular. The downside here is that the API is pretty low-level, so you need to do a bit of work.

It may be possible just to add some additional entries in the resource bundle “PastPluralName” “FuturePluralName” PastSingularName” “FutureSingularName”. But this is currently not implemented. If these special fields were not provided, the format would need to fall back to the current schema. Would this solve your problem?

Thank you for trying, and thank you in advance for your feedback!