It looks like you're new here. If you want to get involved, click one of these buttons!
How can I create a language file with all strings including those not yet translated?
I would like to create a small app to merge the previous translation (including those of many app) and then just highlight the gaps.
I'm not sure I quite understand what you mean. There is a "Show empty fields" link in the translator that will show only the untranslated fields. Is there a way this can be improved to show what you need?
If you want to grab the full list of translatable strings in PHP, you can use:
$all = unserialize (file_get_contents ('lang/_index.php'));
That file contains the index of all translations and their sources, which is used by the translation editor. If it's missing something, you should just have to click "Rebuild index" from the main Languages screen.
Hope that helps, and I'm definitely open to ways we can improve the language editor too :)
Thank you, lang/_index.php is what I was looking for.
The language editor is fine for me, and I think that the obtained translation files are very efficient, but I often need to merge files of translations already made.
So I have to translate the new strings but also isolate extraneous ones (eg those of custom apps).
I think that to be productive in this I have to import translations in DB by identifying whether they are related to: Elefant core, Elefant apps or custom apps (and what app).
Then I would be able to export only the necessary translations.
There is a command to separate translations for a single app, like this:
./elefant bundle-translations appname
This moves all translations for that app into its own lang folder, to make it easier to bundle translations with the apps themselves instead of requiring them all to be in the Elefant core. That may help too, so thought I should mention.
Yes this will help, thanks a lot!