Custom serendipity language file

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Frandy

Custom serendipity language file

Post by Frandy » Thu Aug 25, 2005 5:30 pm

Hi,

Is it possible to specify a custom language file for serendipity ?
I use french supplied language file but i'd like to custom it.
is it possible to put my custom language file in my custom template directory instead of edit serendipity default french language file ?

Thanks for help

Frandy

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Custom serendipity language file

Post by garvinhicking » Thu Aug 25, 2005 7:44 pm

You cannot put the language file into your template, no.

There are two ways for doing this:

1. You edit the french language file. Before you upgrade serendipity you save your file and compare it with the new french file, merge the changes and use your own file again.

2. You copy the french file to /lang/serendipity_lang_fr2.inc.php, then you edit the serendipity_config.inc.php file and search for "fr". You will see an array of defined languages. Add a new line for "fr2" => "My French" and save the file. Then go to your configuration panel and change the language to "My French".

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/

User avatar
Martin
Regular
Posts: 90
Joined: Mon Sep 27, 2004 1:30 am
Location: Oslo
Contact:

Post by Martin » Thu Aug 25, 2005 9:32 pm

I've edited the enlglish language file a little myself because I wanted a pretty specific date-format amongst other things. Using a tool like BBEdit it's really not a big problem to manually correct the files after updating.

-M

Trograin
Regular
Posts: 17
Joined: Sun Oct 09, 2005 9:57 pm
Location: Helsinki in Finland
Contact:

Post by Trograin » Sun Oct 09, 2005 10:00 pm

While talking about language files ehre I thought of posting my question. Swedish language file? will that for some weird reason come up some day...considering the finnish one allready exists :)

I live in FInland but the peopel that will be using my blog are swidish speaking people mostly and rather likes everything to be in swedish :D

any idea if it will happend that there will be a swedish language file added to s9y?

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Sun Oct 09, 2005 10:55 pm

A basic swedish translation is contained in Serendipity 0.9 versions. Volunteers who contribute to the language files are heartly welcome; none of our core developers are speaking swedish, so it's all up to you, the community! :)

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/

Huhu
Regular
Posts: 115
Joined: Tue Oct 04, 2011 3:22 pm

Re: Custom serendipity language file

Post by Huhu » Fri Jan 10, 2014 4:34 pm

Same question, but with an addendum: I would like to edit the default output for certain plug-ins (Spamblock in connection with contact form for example, see http://www.jugger.se/index.php?/pages/kontakt.shtml ).
Because one ends up in a heap of different lang files with small changes, it is quite a thing to blend the changes in after every update.

So, my question: Is it planned for the future to use one central lang file under /templates/[custom template]/ where all customized changes can be put, as the first poster has asked? Which then would not be deleted with an update, saving at least a considerable amount of work?
Or could there be a "master lang file" that overwrites the entries in individual plug-in lang files? Then only one file would have to be updated.

@Garvin I would love to contribute localized lang files, yet mine are far from complete up to now.
Fan of post-apocalyptic Jugger: Free ebook on the sport

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Custom serendipity language file

Post by garvinhicking » Fri Jan 10, 2014 4:48 pm

Hi!

You can set $serendipity['useTemplateLanguage'] = true in your serendipity_config_local.inc.php, this should enable you to use a "lang_en.inc.php" inside your custom template directory to specify any constant you'd like to use.

Another possibility is to simply set all your language constants also directly inside serendipity_config_local.inc.php - this file will not get overwritten by updates, and it is loaded before any other language file.

HTH,
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/

Huhu
Regular
Posts: 115
Joined: Tue Oct 04, 2011 3:22 pm

Re: Custom serendipity language file

Post by Huhu » Fri Jan 10, 2014 4:57 pm

Great! Thanks! (or as the Swedes say: Kanon! :) )
Fan of post-apocalyptic Jugger: Free ebook on the sport

Huhu
Regular
Posts: 115
Joined: Tue Oct 04, 2011 3:22 pm

Re: Custom serendipity language file

Post by Huhu » Fri Jul 04, 2014 12:07 pm

Short question ... I am quite sure I had asked this once a while ago but can't find any posting matching this, so it might have been another system where that has been about.

I would like to change the language of the blog. Doing this through Configuration -> General Settings doesn't work, a change of the language is not saved (switches back to English when saving).

Editing the lang settings in serendipity_config.inc.php also doesn't help it seems.

Any help? Thanks!
Fan of post-apocalyptic Jugger: Free ebook on the sport

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Custom serendipity language file

Post by Timbalu » Fri Jul 04, 2014 12:38 pm

Personal Preferences lang option setting overwrites blog lang.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Huhu
Regular
Posts: 115
Joined: Tue Oct 04, 2011 3:22 pm

Re: Custom serendipity language file

Post by Huhu » Fri Jul 04, 2014 12:53 pm

Timbalu wrote:Personal Preferences lang option setting overwrites blog lang.
That was it! Right!
Strange thing is, if the admin account is set to one language in the personal settings, it seems the blog config (which should show the basic configuration, not teh personal) resets itself to that language?
Fan of post-apocalyptic Jugger: Free ebook on the sport

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Custom serendipity language file

Post by Timbalu » Fri Jul 04, 2014 1:04 pm

Yes. See my and Garvins answers here
http://board.s9y.org/viewtopic.php?f=4& ... #p10438794
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7056
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Custom serendipity language file

Post by yellowled » Wed Jan 28, 2015 9:52 am

challpagal wrote:I would like to change the language of the blog. Doing this through Configuration -> General Settings doesn't work, a change of the language is not saved (switches back to English when saving). ???
You might need to switch it in “Personal Settings” as well.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply