Note: This question is only focused on strings inside source files (PHP files).
When you are creating a Drupal site in a non English country (let say France), you will create all your PHP files with French strings inside.
After that, you can translate this site, let say in Dutch. You will extract PO files, send them into translation an re-import them.
Until this point, everything is fine.
Now, your client wants to have the site also translated into English.
As you may know, all the source files (with French strings) are in fact considered to be in English by the system.
This means that to handle this fact, I have to:
Extract the PO files to translate into French
Convert all source files with french strings into the same source files but with English strings (using the translation created at step 1)
Revert the languages of the PO file created at step 1 (source language becomes target language and the opposite)
Import the reverted file created at step 3 into the site
If you think I am completely wrong with this process, feel free to explain me why. The most complicated step is step 2: Do you know a smooth process or a nice tool to handle it?
I assume I will find something for step 3, but any idea is welcome.
t()
ast('Sì, questa è una frase in italiano.")
the string won't be translated because none of the source strings will contain phrases that aren't in English.t()
, when a translation isn't found. Clearly, it doesn't find a translation for'une phrase en français'
because une phrase en français is not an English sentence. That isn't translating.