Re: Unicode [was Re: [OT] it's vs its]

new topic     » goto parent     » topic index » view thread      » older message » newer message

gshingles wrote:
>  
> That leaves the routine names of any public interface you make available for
> an include.  A good example of a way around that (albeit for a relatively
> simple
> API) is Aku's INI File library.  The main file is inifile.e which exports
> tulisIni(..)
> and ambilIni(..). If you want the English equivalent, you include inifile-en.e
> which wraps those two functions with English names.
> 

Euphoria 4.0 actually has language translation include in the standard library
now as well as number/currency and date translation.

english.lng
-----------

hello Hello
world World

slang.lng
---------
hello What's up
world dudes

myprog.ex
include locale.e as l

l:lang("english")
printf(1, "%s, %s!", {l:w("hello"), l:w("world")})
l:lang("slang")
printf(1, "%s, %s!", {l:w("hello"), l:w("world")})


Output:

  Hello, World!
  What's up, dude!

Language files can have multi-line messages as well as contain codes that will
go along with printf/sprintf.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu