[Python-Dev] The "i" string-prefix: I18n'ed strings

Martin Blais blais at furius.ca
Fri Apr 7 16:07:26 CEST 2006


On 4/7/06, Alexander Schremmer <2005a at usenet.alexanderweb.de> wrote:
> On Thu, 6 Apr 2006 20:35:51 -0400, Martin Blais wrote:
>
> > This is pretty standard
> > getttext stuff, if you used _() a lot I'm surprised you don't have a
> > need for N_(), I always needed it when I used i18n (or maybe I
> > misunderstood your question?).
>
> Have you thought about simply writing _ = lambda x:x instead of N_ ...?
> By doing that, you just need to care about one function (of course _
> doesn't translate in that case and you might need to del _ afterwards).

There are cases where you need N_() after initialization, so you need
both, really.  See the link I sent to Alex earlier (to the GNU manual
example).


More information about the Python-Dev mailing list