robert-j-engdahl / ngettext-wpf

Proper internationalization support for WPF (via NGettext)
GNU Lesser General Public License v3.0
9 stars 12 forks source link

DisplayFormatMsgIdAttribute #11

Open robert-j-engdahl opened 6 years ago

robert-j-engdahl commented 6 years ago

it would be awesome with something like

[DisplayFormatMsgId("{0:n1} days")]
public decimal? SlaughterAgeDays { get; set; }

and then later one could do

<TextBox Text={LocalizedBinding SlaughterPlanEntry.SlaughterAgeDays, Mode=TwoWay} />
robert-j-engdahl commented 5 years ago

Kind of related to #35

We are past the LocalizedBinding approach as GettextFormatConverter is a much simpler approach.

The built-in DisplayFormatAttribute is hard to internationalize as current xgettext does not support named attribute arguments. But ideally that should be fixed in xgettext and not NGettext.Wpf.