[development] translation for the installer?
Jeremy Andrews
lists at kerneltrap.org
Fri Jul 14 15:59:23 UTC 2006
On Fri, 14 Jul 2006 15:45:35 +0200 (CEST)
Gabor Hojtsy <gabor at hojtsy.hu> wrote:
> Hi,
>
> I looked through the installer code. It obvisouly does not
> even try to t() strings, since a database is not yet in
> place. My quite is how to tackle the issue of translating
> the installer to different languages.
>
> - do not care about this, the installer is just a short
> process, only database setup, and then the profile can
> easily handle importing the translation and then on use
> that translation for install wizards
>
> - load in the PO import code (locale.inc) and import a PO
> file for the installer if available into memory. the
> installer PO file should be small, so this should not be a
> resource problem.
>
> - come up with some custom process of providing
> translations for the installer, like a simple key->value
> pair text file.
When I started the installer patch, my intention for
translations was to emulate the t() function (under a
different name), loading translations from a text file rather
than the database, with a simple key-value pair as you
describe.
Where you run into a problem is when there's shared messages,
ie as is desired by the requirements api which could also be
used by Drupal itself when enabling modules, as well as by
the installer during initial setup. Any text displayed by
Drupal is already wrapped in t(), so I think the logical
thing to do is to expand t() to support both reading mappings
from text fiels in addition to from the database. Then t()
could be consistently used in all code, including the
installer.
Cheers,
-Jeremy
More information about the development
mailing list