Boost logo

Boost :

From: René Ferdinand Rivera Morell (grafikrobot_at_[hidden])
Date: 2023-02-07 14:28:31


On Tue, Feb 7, 2023 at 7:29 AM Rainer Deyke via Boost
<boost_at_[hidden]> wrote:
>
> Reservation 1: The plural problem
> ---------------------------------
>
> One fundamental applications of a text templating language is to format
> a user-visible text string with values substituted in, like the following:
>
> "Found %d files and %d directories."
>
[snip]

The way that I'm familiar with to solve such problems in general is to
properly localize your strings. Localization is not just for language
but for gender and plurality. And the usual way to do localization is
to provide whole alternate strings for the messages. Which is
something that would happen outside of the template itself. As it
would mean reading from a database of alternate strings.

-- 
-- René Ferdinand Rivera Morell
-- Don't Assume Anything  -- No Supone Nada
-- Robot Dreams - http://robot-dreams.net

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