Boost logo

Boost :

Subject: Re: [boost] [locale] Formal review of Boost.Locale library starts tomorrow
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-16 04:07:14


> > Another point is that boost::format throws on almost any error while > > boost::locale::format ignores error (as you don't want a translator > > to crash the program) > > > > Hmmm...is there at least some convenient mechanism for the user to detect > errors encountered by boost::locale::format after boost::locale::format has > returned? > > Could the error behavior be specified in the call to boost::locale::format? > I explain, the error of for example missing parameter is almost never a error, consider following: format(translate("Passed {1} day", "Passed {1} days",n)) % n; Now in Hebrew it would have 3 plural forms: single, dual and plural עבר יום {1}‏ /passed {1} day עברו יומיים /passed two-days when "two-days" is a single world - no parameter used עברו {1} ימים / passed {1} days So missing parameter is ok in localization context, while boost::format throws unless you do something specific. Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk