Page 1 of 1

Custom serendipity language file

Posted: Thu Aug 25, 2005 5:30 pm
by Frandy
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

Re: Custom serendipity language file

Posted: Thu Aug 25, 2005 7:44 pm
by garvinhicking
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

Posted: Thu Aug 25, 2005 9:32 pm
by Martin
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

Posted: Sun Oct 09, 2005 10:00 pm
by Trograin
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?

Posted: Sun Oct 09, 2005 10:55 pm
by garvinhicking
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

Re: Custom serendipity language file

Posted: Fri Jan 10, 2014 4:34 pm
by Huhu
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.

Re: Custom serendipity language file

Posted: Fri Jan 10, 2014 4:48 pm
by garvinhicking
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

Re: Custom serendipity language file

Posted: Fri Jan 10, 2014 4:57 pm
by Huhu
Great! Thanks! (or as the Swedes say: Kanon! :) )

Re: Custom serendipity language file

Posted: Fri Jul 04, 2014 12:07 pm
by Huhu
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!

Re: Custom serendipity language file

Posted: Fri Jul 04, 2014 12:38 pm
by Timbalu
Personal Preferences lang option setting overwrites blog lang.

Re: Custom serendipity language file

Posted: Fri Jul 04, 2014 12:53 pm
by Huhu
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?

Re: Custom serendipity language file

Posted: Fri Jul 04, 2014 1:04 pm
by Timbalu
Yes. See my and Garvins answers here
http://board.s9y.org/viewtopic.php?f=4& ... #p10438794

Re: Custom serendipity language file

Posted: Wed Jan 28, 2015 9:52 am
by yellowled
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