I'm using Serendipity 1.3.1 on Debian Lenny at http://66.150.224.204/amos/blog
I have set English as the default language for my blog. When I select Spanish with the Choose Language plugin from the sidebar of my blog, I see that almost all the interface turns to Spanish, but the days of the week and the names of months stay in English. Most of the titles of the sidebar, also display in Spanish, but "choose language", "syndicate this blog" and "categories" all remain in English. If I login as administrator and go to the Configure Plugins page, I see that the titles for plugins "Sindicate this Blog" and "Categories" are displayed in Spanish, but the title for the "Choose Language" plugin remains in English.
Any idea what is the problem?
Problems displaying translations of some plugins
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Problems displaying translations of some plugins
Hi!
Check your "dpkg-reconfigure locale" output - you are missing the spanish locales. Only when those are installed, the date names will be translated.
Some plugins are not translated in spanish, so this is a reason why choose language is still english, though.
Regards,
Garvin
Check your "dpkg-reconfigure locale" output - you are missing the spanish locales. Only when those are installed, the date names will be translated.
Some plugins are not translated in spanish, so this is a reason why choose language is still english, though.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Where are the plugin translation files located?
Where can I translate the plugins? I would be willing to help translate from English to Spanish. I looked through the file lang/serendipity_lang_es.inc.php, and didn't find many phrases like "Syndicate this blog" which need to be translated.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Where are the plugin translation files located?
Hi!
You can take a look at the lang_*.inc.php files inside each plugin subdirectory.
You can take the lang_en.inc.php as a starting point and create translations as lang_es.inc.php - once in ISO-8859-1 format, and once in a UTF-8 subdirectory in UTF-8 charset. But if you only are able to write translations in ISO OR UTF-8, I can also easily create the other variant to add them to Serendipipty.
In /lang/serendpity_lang_es.inc.php you should find all other strings that are not plugin related (or only for a few core plugins). The syndication plugin definitely is mentioned there, the constant "SYNDICATE_THIS_BLOG'" is used for that.
Regards,
Garvin
You can take a look at the lang_*.inc.php files inside each plugin subdirectory.
You can take the lang_en.inc.php as a starting point and create translations as lang_es.inc.php - once in ISO-8859-1 format, and once in a UTF-8 subdirectory in UTF-8 charset. But if you only are able to write translations in ISO OR UTF-8, I can also easily create the other variant to add them to Serendipipty.
In /lang/serendpity_lang_es.inc.php you should find all other strings that are not plugin related (or only for a few core plugins). The syndication plugin definitely is mentioned there, the constant "SYNDICATE_THIS_BLOG'" is used for that.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
There are some plugin where you can enter your own string as the title. Once you enter a fixed string, this will be used in all languages. To prevent that, one would need to patch the sidebar.tpl file and instead of the user's ttle use a constant, along the lines of this:
http://board.s9y.org/viewtopic.php?t=13 ... idebar+tpl
http://board.s9y.org/viewtopic.php?t=11 ... idebar+tpl
http://board.s9y.org/viewtopic.php?t=13 ... idebar+tpl
(Sorry, partially in german, but the code might be enough already to understand)
Regards,
Garvin
There are some plugin where you can enter your own string as the title. Once you enter a fixed string, this will be used in all languages. To prevent that, one would need to patch the sidebar.tpl file and instead of the user's ttle use a constant, along the lines of this:
http://board.s9y.org/viewtopic.php?t=13 ... idebar+tpl
http://board.s9y.org/viewtopic.php?t=11 ... idebar+tpl
http://board.s9y.org/viewtopic.php?t=13 ... idebar+tpl
(Sorry, partially in german, but the code might be enough already to understand)
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Trouble translating plugins
I translated the file plugins/serendipity_event_multilingual/lang_en.inc.php into Spanish and saved the file as plugins/serendipity_event_multilingual/lang_es.inc.php, but the translations fail to display when I select Spanish as the interface language. If I modify the strings in lang_en.inc.php, the changes appear in all languages. How can I make the plugin use the strings in the translated file?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Trouble translating plugins
Hi!
When your blog uses the UTF-8 charset, you must also save your file (in UTF-8 charseT) inside the UTF-8 subdirectory.
Best regards,
garvin
When your blog uses the UTF-8 charset, you must also save your file (in UTF-8 charseT) inside the UTF-8 subdirectory.
Best regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Garvin - I read the posts referenced above. While I did not translate them, I get the basic concept being proposed. IMHO that is a lot to ask - modifying tpls, requiring a template to have config.inc.php, creating a function, etc.
I'm thinking out loud here - what if the plugins that permit changing titles that are otherwise defined in language files (ie, comments, syndication, etc) had a radio button option labeled, something like: "Force title from language file if defined y/n" or something like that? Then have the plugin set $item.title to the CONST.VALUE???
I'm thinking out loud here - what if the plugins that permit changing titles that are otherwise defined in language files (ie, comments, syndication, etc) had a radio button option labeled, something like: "Force title from language file if defined y/n" or something like that? Then have the plugin set $item.title to the CONST.VALUE???
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!

Regards,
Garvin
Yes, definitely some work is needed there, because matchmaking of a title is quite complex. And involves many definitions. The alternative, to create 20 or so title input fields for each language that could happen is IMHO even more bad.Don Chambers wrote:Garvin - I read the posts referenced above. While I did not translate them, I get the basic concept being proposed. IMHO that is a lot to ask - modifying tpls, requiring a template to have config.inc.php, creating a function, etc.
That would work, but would require editing each available plugin. This is a task that would take up too much of my time right now, so I can't offer to implement that as the benefit is IMHO quite small and not many people ask for that. And those that do ask usually get along with the proposed template changes. Tough call.I'm thinking out loud here - what if the plugins that permit changing titles that are otherwise defined in language files (ie, comments, syndication, etc) had a radio button option labeled, something like: "Force title from language file if defined y/n" or something like that? Then have the plugin set $item.title to the CONST.VALUE???
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/