12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- function hook_l10n_update_projects_alter(array &$projects) {
- foreach (array_keys($projects) as $name) {
-
-
-
- if (strpos($name, 'custom_') === 0) {
- $projects[$name]['info']['interface translation project'] = 'custom_module';
- }
-
- if (strpos($name, 'feature_') === 0) {
- $projects[$name]['info']['interface translation project'] = FALSE;
- }
- }
-
- if (isset($projects['custom_module']) && empty($projects['custom_module']['info']['l10n path'])) {
- $path = drupal_get_path('module', 'custom_module');
- $projects['custom_module']['info']['l10n path'] = $path . '/translations/%language.po';
- }
-
-
-
-
- $projects['new_example_project'] = array(
- 'project_type' => 'module',
- 'name' => 'new_example_project',
- 'info' => array(
- 'name' => 'New example project',
- 'version' => '7.x-1.5',
- 'core' => '7.x',
- 'l10n path' => 'http://example.com/files/translations/%core/%project/%project-%release.%language.po',
- ),
- );
- }
- function hook_l10n_update_languages_alter(array &$langcodes) {
-
- if (isset($langcodes['nl'])) {
- $langcodes['nl-NL'] = $langcodes['nl'];
- unset($langcodes['nl']);
- }
- }
|