1
|
|
2
|
Localization Update
|
3
|
-------------------
|
4
|
Automatically download and update your translations by fetching them from
|
5
|
http://localize.drupal.org or any other Localization server.
|
6
|
|
7
|
The l10n update module helps to keep the translation of your drupal core and
|
8
|
contributed modules up to date with the central Drupal translation repository
|
9
|
at http://localize.drupal.org. Alternatively locally stored translation files
|
10
|
can be used as translation source too.
|
11
|
|
12
|
By choice updates are performed automatically or manually. Locally altered
|
13
|
translations can either be respected or ignored.
|
14
|
|
15
|
The l10n update module is developed for:
|
16
|
* Distributions which include their own translations in .po files.
|
17
|
* Site admins who want to update the translation with each new module revision.
|
18
|
* Site builders who want an easy tool to download translations for a site.
|
19
|
* Multi-sites that share one translation source.
|
20
|
|
21
|
Project page: http://drupal.org/project/l10n_update
|
22
|
Support queue: http://drupal.org/project/issues/l10n_update
|
23
|
|
24
|
Installation
|
25
|
------------
|
26
|
Download, unpack the module the usual way.
|
27
|
Enable this module and the Locale module (core).
|
28
|
|
29
|
You need at least one language other than English.
|
30
|
On Administration > Configuration > Regional and language:
|
31
|
Click "Add language"
|
32
|
Pull-down menu: Choose your new language
|
33
|
Then click "Add language"
|
34
|
|
35
|
Drupal is now importing interface translations. This can take a few minutes.
|
36
|
When it's finished, you'll get a confirmation with a summary of all
|
37
|
translation files that have been pulled in.
|
38
|
|
39
|
If required, enable the new language as default language.
|
40
|
Home > Administration > Configuration > Regional and language:
|
41
|
Select your new language as default
|
42
|
|
43
|
Update interface translations
|
44
|
-----------------------------
|
45
|
On Home > Administration > Configuration > Regional and language:
|
46
|
Choose the "Translation updates" tab
|
47
|
Change "Check for updates" to Daily or Weekly instead of the default "Never".
|
48
|
|
49
|
Cron will from now on check for updated translations, and will report the
|
50
|
update status on the status page (Home > Administration > Reports).
|
51
|
|
52
|
To check the translation status and execute updates manually, go to
|
53
|
Administration > Configuration > Regional and language > Translate inteface
|
54
|
Here you see English and your new language.
|
55
|
Choose the "Update" tab
|
56
|
You see a list of all modules and their translation status.
|
57
|
On the bottom of the page, you can manually update using "Update translations".
|
58
|
|
59
|
Use Drush
|
60
|
---------
|
61
|
You can also use drush to update your translations:
|
62
|
drush l10n-update # Update translations.
|
63
|
drush l10n-update-refresh # Refresh available information.
|
64
|
drush l10n-update-status # Show translation status of available project
|
65
|
|
66
|
|
67
|
Summary of administrative pages
|
68
|
-------------------------------
|
69
|
Translations status overview can be found at
|
70
|
Administration > Configuration > Regional and language > Languages > Translation updates
|
71
|
|
72
|
Update configuration settings can be found at
|
73
|
Administration > Configuration > Regional and language > Translate interface > Update
|
74
|
|
75
|
Translating Drupal core, modules and themes
|
76
|
-------------------------------------------
|
77
|
When Drupal core or contributed modules or themes get installed, Drupal core
|
78
|
checks if .po translation files are present and updates the translations with
|
79
|
the strings found in these files. After this, the localization update module
|
80
|
checks the localization server for more recent translations, and updates
|
81
|
the site translations if a more recent version was found.
|
82
|
Note that the translations contained in the project packages may become
|
83
|
obsolete in future releases.
|
84
|
|
85
|
Changes to translations made locally using the site's build in translation
|
86
|
interface (Administer > Site building > Translate interface > Search) and
|
87
|
changes made using the localization client module are marked. Using the
|
88
|
'Update mode' setting 'Edited translations are kept...', locally edited
|
89
|
strings will not be overwritten by translation updates.
|
90
|
NOTE: Only manual changes made AFTER installing Localization Update module
|
91
|
are preserved. To preserve manual changes made prior to installation of
|
92
|
Localization Update module, use the option 'All existing translations are kept...'.
|
93
|
|
94
|
po files, multi site and distributions
|
95
|
--------------------------------------
|
96
|
Multi sites and other installations that share the file system can share
|
97
|
downloaded translation files. The Localization Update module can save these
|
98
|
translations to disk. Other installations can use these saved translations
|
99
|
as their translation source.
|
100
|
|
101
|
All installations that share the same translation files must be configured
|
102
|
with the same 'Store downloaded files' file path e.g. 'sites/all/translations'.
|
103
|
Set the 'Update source' of one installation to 'Local files and remote server'
|
104
|
or 'Remote server only', all other installations are set to
|
105
|
'Local files only' or 'Local files and remote server'.
|
106
|
|
107
|
Translation files are saved with the following file name syntax:
|
108
|
|
109
|
<module name>-<release>.<language code>.po
|
110
|
|
111
|
For example:
|
112
|
masquerade-6.x-1.5.de.po
|
113
|
tac_lite-7.x-1.0-beta1.nl.po
|
114
|
|
115
|
Po files included in distributions should match this syntax too.
|
116
|
|
117
|
Alternative sources of translation
|
118
|
----------------------------------
|
119
|
|
120
|
Each project i.e. modules, themes, etc. can define alternative translation
|
121
|
servers to retrieve the translation updates from.
|
122
|
Include the following definition in the projects .info file:
|
123
|
|
124
|
l10n server = example.com
|
125
|
l10n url = http://example.com/files/translations/l10n_server.xml
|
126
|
|
127
|
The download path pattern is normally defined in the above defined xml file.
|
128
|
You may override this path by adding a third definition in the .info file:
|
129
|
|
130
|
l10n path = http://example.com/files/translations/%core/%project/%project-%release.%language.po
|
131
|
|
132
|
API
|
133
|
---
|
134
|
Using hook_l10n_servers the l10n update module can be extended to use other
|
135
|
translation repositories. Which is usefull for organisations who maintain
|
136
|
their own translation.
|
137
|
|
138
|
Using hook_l10n_update_projects_alter modules can alter or specify the
|
139
|
translation repositories on a per module basis.
|
140
|
|
141
|
See l10n_update.api.php for more information.
|
142
|
|
143
|
Maintainers
|
144
|
-----------
|
145
|
Jose Reyero
|
146
|
Gábor Hojtsy
|
147
|
Erik Stielstra
|