[wp-hackers] Plugins using post types with localization

José Fontainhas jfontainhas at gmail.com
Sun Jul 3 22:35:18 UTC 2011


Also, AFAICT, the Log Deprecated plugin isn't loading a textdomain at
all, nor are its calls to __(), _e(), et al, using one. It doesn't
even have a .pot file (although it's easy enough to create one).

-- Z

2011/7/3 José Fontainhas <jfontainhas at gmail.com>:
> Not sure I get the question fully, or if it should be discussed on the
> polyglot's blog[1], but the way bbPress (plugin) does it is the way
> any well behaved plugin should, i.e. it loads a language file for its
> own textdomain[2], uses internationalized strings with that
> textdomain[3], which can be translated from a .pot file, specific to
> that plugin.
>
> If, on the other hand, those custom post types are being defined by a
> theme's functions.php file, the process is only different in that the
> file should load the textdomain for the *theme* [4], and said theme
> should have its own .pot file.
>
> In short, individual custom post types are not a part of core and
> hence those strings do not exist on core's .pot files
>
> -- Zé
>
> [1] http://wppolyglots.wordpress.com
> [2] http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
> [3] http://codex.wordpress.org/I18n_for_WordPress_Developers#Translatable_strings
> [4] http://codex.wordpress.org/Function_Reference/load_theme_textdomain
>
>
>
>
> On 3 July 2011 22:58, Diana K. Cury <dianakac at gmail.com> wrote:
>> Hi Andrew,
>>
>> I'm using your plugin for know how to handle post types, but it seems is
>> unable to get the translations in post screens too. I see there are some
>> mods for not show some aspects, etc but I tried in remaining buttons and
>> labels around and the translation just don't reach anything. If I change
>> your code for display a whole editing screen, translation still doesn't
>> work.
>>
>> I'm waiting for bbPress to see how this is handled there.
>>
>> ----- Original Message ----- From: "Andrew Nacin" <wp at andrewnacin.com>
>> To: <wp-hackers at lists.automattic.com>
>> Sent: Sunday, July 03, 2011 3:01 PM
>> Subject: Re: [wp-hackers] Plugins using post types with localization
>>
>>
>> On Sun, Jul 3, 2011 at 1:11 PM, Diana K. Cury <dianakac at gmail.com> wrote:
>>
>>> Hello there,
>>>
>>> Someone could suggest me a plugin tha uses post types with working
>>> localization? I still can´t find a solution for this issue: post type
>>> screens aren't reached by the translation on plugins. Even the Log
>>> Deprecated has this problem.
>>
>>
>> How so?
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>


More information about the wp-hackers mailing list