I have installed a Drupal 8.5 site in French (monolingual). Then, I added content.
Of course, there are many strings in the PHP files of my custom theme/module I pass to t()
. There are also many strings in the Twig files I translated with {{ 'a string'|trans }}
.
After a while, I added English.
Unfortunately, I discovered that all the strings (interface) I just mentioned are seen by Drupal as English string.
For example, using the Translation template extractor module, I don't have the choice to extract the strings in English. I have only 2 options for the extraction: Language independent template and Template file for French translations.
When I use the Translation Management Tool module, all the locale sources strings have Original language under the English column and Not translated under the French column.
How do I tell Drupal that all my strings (PHP and Twig) are French strings? Alternatively, what is the process to be able to export/translate in English, and import files (PO or XLIFF) into my site?