
Thanks to following WordPress coding standards, Marketers Delight can be fully translated using popular translation tools and Plugins.
Poedit php how to#
In this guide I will show you how to fully translate the text strings MD adds around your site from English to any language you prefer to use on your own website.
Poedit php software#
One of the many things that makes WordPress great is how translatable it is to any language, opening it up as the premier software for the entire world to use. Step 5: Enable New Language, Check Your Site for Success.PO Files, Register Child Theme Translation

Poedit php download#
Poedit php install#
I will not explain it here for every case, if you are using ubuntu server just like me, simply use this command : apt-get install gettext Well, we just have to use exactly the same tool POEdit uses : the xgettext linux command.įor this, you have to install it on your development environment. po files with all of the static texts that are currently written in our project ? */ public function handle () Ģ - Generating and updating. app/Console/Commands/TranslationsParseBladeTemplatesCommand.php
Poedit php update#
You can also update it and put it in the "lang" folder if it makes more sense to you.Įnough talk, here is the file! Just put it in the app/Console/Commands directory and you're good to go : You'll see that I put the resulting files in a "blade-translations" folder at the root of the resources folder.But you are free to modify it on lines 88-99 and 129. I have separated them in the resulting files too so it can be used in different PO domains. Directory structure : I use different folders at the root of my views templates (one for frontend and one for backend).

I only use '_i()' and '_n()' functions but if you use others, you can configure them on line 29.

I will not explain here all of my script, as it is a little bit complicated, so I will just give the whole file for you. If you are not using blade, you can skip this part and go to the second part. It now just takes a few seconds to parse my blade files, update translations and update my PO files with all my project's translations.ġ - Parsing blade templates to make "blade translations files" So I took a little time to think about it and I found a way to handle all of this myself with just a simple artisan command. So everytime you change a few static strings in your project, you have to download all your files, and then wait for POEdit to parse all of them. po files, I now have to download all my files locally to be able to parse them with POEdit.Īnd thirdly, POEdit parsing is REALLY slow. Secondly, I have started to work remotely, on a development server accessed throught SSH. Therefore, when they are, they are referenced in the PO file with a hash, so it's not very easy to find in which file the original string is located :Įnter fullscreen mode Exit fullscreen mode You have to use the views:cache and views:clear commands to update this folder and I don't really know how it works, but I sometimes have old texts that are still there, or new texts that are not. It works fine too, but it has a few issues.
