Currently, the only way to use a custom IFormatProvider with NGettext is to subclass CultureInfo, which is not very convenient.
The Get*String methods of ICatalog could take a IFormatProvider, so one can use custom formatters. The given IFormatProvider would be in charge of formatting numbers and date correctly.
Usage example: I am trying to do a simple "grammar macro" text, which looks like this:
String.Format("{0:They} {0:are} coding in C#", myPerson);
Which could give He is coding in C#, or retrieve a translation with other formatters from the catalog, like {0:Il} cod{0:ent} en C#
Currently, the only way to use a custom
IFormatProvider
with NGettext is to subclassCultureInfo
, which is not very convenient.The
Get*String
methods of ICatalog could take aIFormatProvider
, so one can use custom formatters. The givenIFormatProvider
would be in charge of formatting numbers and date correctly.Usage example: I am trying to do a simple "grammar macro" text, which looks like this:
Which could give
He is coding in C#
, or retrieve a translation with other formatters from the catalog, like{0:Il} cod{0:ent} en C#