Tag: Translations
How to change the WordPress post updated messages of the edit screen
WordPress posts edit interface has got a good information messages system for all user actions. It doesn’t matter what is the done action, WordPress talks to us: draft saved, post updated, published… Actually, it’s a perfect information system if regulary you only publish posts or sometimes a new page, ie, if you have just got a blog but, when your website has other kinds of information (films, cats, recipies, products…) WordPress keeps saying “post updated” and in fact, you are editing an actor’s profile, or a recipe, or whatever, but not a post… Would not it be awesome that WordPress says “Actor profile updated”, or “Recipe improved” or any message more like the natural language? So, if you don’t want that WordPress talks like a machine, you need use post_updated_messages
.
I’m sure that if your website talks about recipes, or actor profiles (whatever that is not a post), you are used to use the WP function register_post_type
but probably you don’t know that there is another option that works together with register_post_type that allows us also to change the information messages related with these new kinds of information Continue reading…
Your plugins ready for WordPress PolyGlots
Perhaps, you are writing a new WordPress plugin and perhaps, you do want to translate it… If this is your case, there are two approaches: to translate the code via a code translator programme, for example PoEdit, or to use the translations WordPress system called PolyGlots.
In the first case –translating via an external programme– you just follow the general i18n WordPress developement recomendations for local languages but, if you have choosen WordPress PolyGlots plataform then, in addition to the general i18n rules, you have to do some little changes in the code of your plugin. In fact, there are not a lot of changes to do, just a few ones. Continue reading…
Constructing WP themes or plugins that take into account future gender translations (2)
Few days ago I began a serie of articles about how to design a WordPress Theme that facilitates that in the future it is possible to make a translation that takes into account the gender. In the first article I suggested a little technique to mark the Post Type (and for extension Taxonomy) objects including a new property that keeps the gender of the object and that depends on the translation today I’m going to extend this technique also for the labels of the Post type inside the Admin interface.
As we saw, the core of the first proposal consists of adding one more line inside the array that is used to register any post type Continue reading…
Constructing WP themes or plugins that take into account future gender translations
Actually, there is not a simple solution for avoid the gender issue if you are translating a WP theme or plugin to languages that take into account the gender for selecting the words of a sentence. Simple, try to substitute the gendered words or expression for others that feet into the sentence without too many problems… But if you are not translating but creating a new theme or plugin you can use a simple set of techniques –better maybe suggestions–, that will allow future translators for dealing to this kind of problems with better results. Let’s go to see three simple proposals.
But, before to go to the solution, let me show you a tiny example of this kind of gender issues. Continue reading…
Loading a language translation in a Child Theme
When we need introduce some changes in the behaviour, features or style of the theme that we are using, Best practices in the WordPress environment advises us to never change the principal theme but writting a small child theme containing those modifications. In that case, when those modifications show text on the screen, of course we can opt for outputting directly this text but it’s usually better to use the translation functions. But then, How to read a child theme translation keeping the principal (parent) theme translation?
The solution is very simple because in fact there are two different functions to do that. For reading the translation of the parent theme, we have to use the function called load_theme_textdomain
however, for reading the translation of the child theme Continue reading…