[Mono-dev] I18n and ASP.Net (Rolando Martínez)

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Feb 8 00:14:33 EST 2008


2008/2/7 Rolando Martinez <rolandomartinezg at gmail.com>:
> Hi,
>  Thanks for your answers,
>
>  I'm working on a application for online translation of po files (something
> like a online editor of po files ) . Then I would know if I can use
> something like this (http://www.mono-project.com/Internationalization) and
> not the typical localization features (resources files).

Would you be interested in sharing code with MonoDevelop's translation
addin? We already have code to parse/edit/save po files, at
trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/ (MIT/X11
license), and would be interested in a web based editor too :)

Using gettext from an ASP.NET app would get complicated because
libintl gets the language from the LANG environment variable, which
would obviously cause problems trying to use multiple languages within
a single process, i.e. a threaded web server. However, there's no
reason in principle why you could not hack the libintl library to
allow different 'instances' to be used from different threads, or even
port it to C# and use the current thread's .NET culture.

Once these problems were solved, you could use expressions like <%#
GettextCatalog.GetString ("Translate me") %>. You'd also need a
scanner for find extracting translatable strings, but MonoDevelop's
gettext scanner could do that with a couple of regexes.

FWIW, the ASP.NET quickstart page claims that the localisation model
in 2.0 can be swapped out, but there doesn't seem to be much info on
this.

-- 
Michael Hutchinson
http://mjhutchinson.com



More information about the Mono-devel-list mailing list