| 1 |
// $Id: README.txt,v 1.3 2007/02/02 22:24:34 goba Exp $
|
| 2 |
|
| 3 |
|| WARNING ---------------------------------------------------------------------
|
| 4 |
|| The HEAD version of autolocale contains development code currently
|
| 5 |
|| intended to keep up with development on Drupal 6.x.
|
| 6 |
|| -----------------------------------------------------------------------------
|
| 7 |
|
| 8 |
Autolocale module and install profile
|
| 9 |
================================================================================
|
| 10 |
|
| 11 |
The goal of the autolocale module and install profile is to provide a profile
|
| 12 |
to automatically import interface translations in install time and later when
|
| 13 |
modules are enabled / disabled.
|
| 14 |
|
| 15 |
How to use in installation time
|
| 16 |
--------------------------------------------------------------------------------
|
| 17 |
|
| 18 |
1. Create the profiles/localized folder.
|
| 19 |
2. Copy localized.profile into that folder.
|
| 20 |
3. Download a translation which is ready for Drupal 5 (ie. it has
|
| 21 |
an installer.po file and other module translation files, eg. the
|
| 22 |
Hungarian translation with the 'hu' language code)
|
| 23 |
4. Copy the installer.po into the 'localized' profile folder, and
|
| 24 |
rename it to the language name, eg. hu.po for Hungarian
|
| 25 |
5. Move module translation files into the module folders (only
|
| 26 |
translations of modules enabled by default will get imported),
|
| 27 |
remember to name them by the language name (either hu.po or
|
| 28 |
$filename.hu.po for example).
|
| 29 |
6. Start Drupal translation and use the "Drupal localized" profile
|
| 30 |
7. You should have the language enabled and the strings imported
|
| 31 |
on your fully installed Drupal site.
|
| 32 |
|
| 33 |
How to use on an already installed site
|
| 34 |
--------------------------------------------------------------------------------
|
| 35 |
|
| 36 |
1. Copy autolocale module files to the modules folder (skip the
|
| 37 |
localized.profile file). Putting the module into sites/all/modules/autolocale
|
| 38 |
is suggested.
|
| 39 |
2. Turn on the module on the admin interface.
|
| 40 |
3. You will get guidance in the form of a Drupal message after enabling the
|
| 41 |
module, so you will find the interface to automatically import translations
|
| 42 |
on the web interface.
|
| 43 |
4. Later when you install or enable a module, all strings for that module
|
| 44 |
will get imported for all enabled languages.
|
| 45 |
|
| 46 |
Information for developers
|
| 47 |
--------------------------------------------------------------------------------
|
| 48 |
|
| 49 |
Implemented installation workflow:
|
| 50 |
|
| 51 |
- one selects the localized profile to install
|
| 52 |
- selects the language to install with
|
| 53 |
- the installer works in that language (this is a core feature already)
|
| 54 |
- the install profile turns the locale module on
|
| 55 |
- the install profile turns the autolocale module on,
|
| 56 |
which searches for enabled modules/themes and imports their
|
| 57 |
interface translations
|
| 58 |
|
| 59 |
Searched files are:
|
| 60 |
|
| 61 |
- modulefolder/po/$languagecode.po
|
| 62 |
- modulefolder/po/$anyname.$languagecode.po
|
| 63 |
|
| 64 |
The first is for backwards compatibility with contrib module practice. The
|
| 65 |
second allows for more language files for a language in one folder. This is
|
| 66 |
useful to separate the files by function (ie. system-install.hu.po,
|
| 67 |
system-module.hu.po and general.hu.po all go to modules/system/po).
|
| 68 |
|
| 69 |
TODO:
|
| 70 |
|
| 71 |
- it would be very nice to find a way to remove unused translations
|
| 72 |
(stuff that is only in locales_source or stuff related to modules
|
| 73 |
already disabled).
|
| 74 |
|
| 75 |
Maintainer
|
| 76 |
--------------------------------------------------------------------------------
|
| 77 |
|
| 78 |
Concept, implementation and maintanance by Gabor Hojtsy (gabor at hojtsy.hu)
|