comp.lang.ada
 help / color / mirror / Atom feed
* I18N gettext style
@ 2000-03-04  0:00 David Starner
  2000-03-04  0:00 ` tmoran
  2000-03-06  0:00 ` Nick Roberts
  0 siblings, 2 replies; 8+ messages in thread
From: David Starner @ 2000-03-04  0:00 UTC (permalink / raw)


gettext is a C library that does message translation - i.e.

	puts (N("Hi!"));
	
will replace Hi with whatever's appropriate for the locale, provided the 
message catalog has it. That's simple enough to interface/rewrite for Ada. 
But it's also used in stuff like

	printf (N("Hi! There are %d widgets!"), I);
	
where in the %d will get moved to where ever the number needs to be in the 
translated message. 

Unfortunetly,
	Ada.Text_IO.Put (N("Hi! There are ") && To_String(I) && N("widgets!"));
won't put I in the proper position in the translated message for some
languages. What's the easiest way to do this type of thing for Ada?

-- 
David Starner - dstarner98@aasaa.ofe.org
Only a nerd would worry about wrong parentheses with
square brackets. But that's what mathematicians are.
   -- Dr. Burchard, math professor at OSU




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-03-06  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-04  0:00 I18N gettext style David Starner
2000-03-04  0:00 ` tmoran
2000-03-04  0:00   ` David Starner
2000-03-05  0:00     ` Jeff Carter
2000-03-05  0:00       ` Ehud Lamm
2000-03-05  0:00   ` tmoran
2000-03-06  0:00 ` Nick Roberts
2000-03-06  0:00   ` David Starner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox