Hello,
I'm am testing out Drupal 6's translation capabilities and have a quick question... If I download, for example, the French translation package, do I then need to move each .po file to each module's translations directory, even for core modules like node.module? Or is there a central location I can place the whole package in? I like being able to place my custom modules in the sites/all/modules/ directory; I'd like to be able to place the French translation package in a folder such as sites/all/translations/fr/ which would be checked in addition to the standard locations. Perhaps this is already possible, but my searches didn't turn anything up.
When I look at the locale_batch_by_language function in locale.inc, I see this line:
$files = array_merge($files, file_scan_directory(dirname($component->filename) .'/translations', '(^|\.)'. $langcode .'\.po$', array('.', '..', 'CVS'), 0, FALSE));
I'm thinking that by adding the following line (and changing the SQL query to include the "type" column), it would support the centralized location option, assuming a standardized directory hierarchy:
$files = array_merge($files, drupal_system_listing('\.po$', 'translations/' . $langcode . '/' . $component->type . 's/' . $component->name, 'filename', 0));
However, I'm not sure I'm doing that correctly. I'm also not sure if this ability already exists or, if not, why not. I'm aware of the build.php script in the Hungarian translation, but I'd love to be able to drop in a translation package the way I can with modules and themes.
Your thoughts are appreciated!
Comments
Why don't you use symbolic
Why don't you use symbolic links on the filesystem? It's easy, doesn't hurt at upgrading.
--
Fehér János aka Aries
http://aries.mindworks.hu