[wp-polyglots] Localizing a theme

iwan wordpress at slebog.net
Sat Sep 3 12:15:10 GMT 2005


Hi

I'm trying to use the gettexted default theme, and having similar  
problems.

So am I right in thinking that at the top of each (main) theme file,  
I need:

load_theme_textdomain('theme');

and then each string should call the same domain, e.g.:

__('Author','theme')

If so, then since the gettext theme is *always* going to need these  
modifications, why aren't they there already by default? Or am I  
missing something? ;-)

I'm happy to make all the changes and commit them, if people think  
this is needed.

Thanks
iwan



On 26 Meh 2005, at 12:17, Txopi wrote:

> Firas D.(e)k dio:
>
>> Firas D. wrote:
>>
>>> Txopi wrote:
>>>
>>>
>>>> It doesn't work so as Fira explained in that mail I have added  
>>>> this line
>>>> to the index.php file of the theme where the string I want to  
>>>> translate is
>>>> used:
>>>>
>>>> <?php load_theme_textdomain(); ?>
>>>>
>>>> It returns to me and error in the wp-i10n.php file where that  
>>>> function is
>>>> defined, because as you can see, it needs a parameter with  
>>>> something
>>>> called domain:
>>>>
>>>>
>>> Yup, that's the name of your mo file minus the extension.  
>>> load_theme_textdomain('themename').
>>>
>> http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/
>>
>
> Great! I achieved to use the theme's localization strings. Thanks!
>
> Txopi.
>
> _______________________________________________
> wp-polyglots mailing list
> wp-polyglots at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-polyglots
>
>



More information about the wp-polyglots mailing list