I’d like to override the french translation of “Email” in the the contact module.
The official french word for email is courriel, which is… weird and very ugly.
So, I tried to copy the official BB translation file fr_FR.po to wp-content/languages/plugins/bb-plugin/, change the translation of Email with poedit then compile the .po to .mo but nothing happened in my site front-end. After looking into the plugin file class-fl-builder.php, if the file fr_FR.po exists in wp-content/plugins/bb-plugin/languages/ the plugin will not look in another location. Thats why my custom translation is not taken into account.
Is there a way to force bb-plugin to use a specific version of an existing translation file?
Of course, I’d like the solution to be “upgrade proof” =)
Thanks for reaching out with your question. Would you suggest that we change this in our French translation, or is this just something you’d like to do for this particular site?
We can look into updating our French translate. Regarding overriding the default French translation, I am not sure how to do this without overwriting the file (which wouldn’t be upgrade proof). I found this StackOverflow QA. You could experiment with the code snippet provided:
‘Courriel’ is the official french word for ‘Email’ but nobody use it except… herr maybe… veteran french teachers? =)
However, your hint led me to the solution. It works perfectly, thanks a lot for your help.
Just, in case someone is also interested on this topic, I found the complete explanation here: https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext.