MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Translation Question



Marius Schaefer <maillist@b-p-a.com> writes:

> ******    message to minivend-users from Marius Schaefer <maillist@b-p-a.com>     ******
> 
> Hi,
> 
> I do it this way:
> 
> [perl interpolate=1]
> 	if ("[data session failure]" =~ /Not logged in./) { return 'Sie sind
> noch nicht angemeldet.'; }
> 	if ("[data session failure]" =~ /^Password mismatch./) { return
> 'Falsches Passwort.'; }
> 	if ("[data session failure]" =~ /^Username already exists./) { return
> 'Diese User existiert bereits. Bitte wählen Sie einen anderen Namen.';}
> 	if ("[data session failure]" =~ /^Username does not exist./) { return
> 'User existiert nicht.';}
> 	if ("[data session failure]" =~ /^Must enter at least 4 characters for
> password./) { return 'Das Passwort muß mindestens vier Zeichen lang
> sein.'; }
> 	if ("[data session failure]" =~ /^Password and check value don't
> match./) { return 'Die beiden Passwörter stimmen nicht überein.'; }
> [/perl]

Ouch. Why not adding the strings to locale database and using then
[loc][data session failure][/loc]. Otherwise you can improve your
code with using a hash.

Ciao
        Racke

-- 
I'll take portability, sanity and clean design before some "my dick is
bigger than your dick" direct rendering argument any day.
-
linus@kernel 14. December 1999 [code freeze for 2.4 now !]



Search for: Match: Format: Sort by: