[Zope-dev] Re: [Checkins] SVN: zope.i18n/branches/regebro-pluralsupport/src/zope/i18n/ Changed the API. It's unwieldy as it is, so better have separate methods

Hanno Schlichting plone at hannosch.info
Wed Jul 16 17:42:57 EDT 2008


Lennart Regebro wrote:
> On Wed, Jul 16, 2008 at 22:36, Hanno Schlichting <plone at hannosch.info> wrote:
>> <p i18n:translate="">
>> You have to pay
>> <span tal:content="view/formatted_amount" i18n:name="amount"
>> i18n:count="view/amount">6 dollars</span>.
>> </p>
>>
>> In this case the underlying value is a simple integer, but the actual
>> presentation might be locale dependent, like currency formatting.
> 
> Ah. Yes, that's a nice usecase I hadn't thought about.
> 
>> How does this behave in regard to zope.i18nmessageid?
> 
> There will need to be some extension of the API, I think.
> 
>> So I think we need to signal to the messageid which variable in the mapping
>> is significant for the i18n count, right?
> 
> It's easier to just pass in the i18n count separately, IMO.

Right. Since otherwise you won't be able to support the same use-case I 
outlined above in regard to the currency formatting. There the count 
variable might not be contained in the mapping at all.

Hanno



More information about the Zope-Dev mailing list