Language Files // Cached Entries
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Language Files // Cached Entries
Hi everybody,
Finally I have upgraded to 1.6.2. myself. Since I ran 1.1.2 (!), I did a clean installation and imported the data step by step directly into the database respectively installed plugins and configured them manually.
Done. The blog runs fine without any issues
Two questions:
(1) I needed to change "a lot" in the global ./lang/UTF-8/serendipity_lang_en.inc.php language file. Just have a ton of customized definitions.
Now, is there an option to keep "personal" settings in a local version of the file similar to the serendipity_config_local.inc.php configuration?
E.g. either ./lang/UTF-8/serendipity_lang_en.local.inc.php or
./templates/{my_template_name}/UTF-8/serendipity_lang_en.inc.php
Or do I have to reapply my local changes with every update?
(2) Where are the cached entries stored?
Cheers.
P.S.: Needless to say that I will grab the 1.7. release once it is stable enough … and play with the 2k11 responsive template, of course.
Finally I have upgraded to 1.6.2. myself. Since I ran 1.1.2 (!), I did a clean installation and imported the data step by step directly into the database respectively installed plugins and configured them manually.
Done. The blog runs fine without any issues
Two questions:
(1) I needed to change "a lot" in the global ./lang/UTF-8/serendipity_lang_en.inc.php language file. Just have a ton of customized definitions.
Now, is there an option to keep "personal" settings in a local version of the file similar to the serendipity_config_local.inc.php configuration?
E.g. either ./lang/UTF-8/serendipity_lang_en.local.inc.php or
./templates/{my_template_name}/UTF-8/serendipity_lang_en.inc.php
Or do I have to reapply my local changes with every update?
(2) Where are the cached entries stored?
Cheers.
P.S.: Needless to say that I will grab the 1.7. release once it is stable enough … and play with the 2k11 responsive template, of course.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Language Files // Cached Entries
Hi!
Yes, one way is to actually declare them in your serendpity_config_local.inc.php - language files would be loaded after that file, and since constants are declared upon first usage and cannot be overwritten, that would be possible.
Another way it to create a lang_en.inc.php file in your custom template directory, this one should also get loaded before the global language.
Entries are stored in the serendipity_entryproperties database table, with the "ep_cache_body" and "ep_cache_extended" fields.
1.7 will actually be released in a few days
Regards,
Garvin
Yes, one way is to actually declare them in your serendpity_config_local.inc.php - language files would be loaded after that file, and since constants are declared upon first usage and cannot be overwritten, that would be possible.
Another way it to create a lang_en.inc.php file in your custom template directory, this one should also get loaded before the global language.
Entries are stored in the serendipity_entryproperties database table, with the "ep_cache_body" and "ep_cache_extended" fields.
1.7 will actually be released in a few days
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/
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Hey Garvin,
Thanks a bunch!
Makes totally sense, great.
Yours
John
Thanks a bunch!
Makes totally sense, great.
Yours
John
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Garvin,
I could successfully define a local constants and overwrite the global value from the language file by putting it into the serendipilty_config_local.inc.php file as you described.
I only use one language, therefore, the solution with the configuration file is good enough for me.
However, I didn't get it to work in the template directories!
I tried both names for the file: lang_en.inc.php and serendipity_lang_en.inc.php
Tried all those directories, one at the time:
.../template/{my_template}/.
.../template/{my_template}/lang/.
.../template/{my_template}/lang/UTF-8/.
.../template/{my_template}/UTF-8.
The value did not get picked up from those locations.
Cheers.
I could successfully define a local constants and overwrite the global value from the language file by putting it into the serendipilty_config_local.inc.php file as you described.
I only use one language, therefore, the solution with the configuration file is good enough for me.
However, I didn't get it to work in the template directories!
I tried both names for the file: lang_en.inc.php and serendipity_lang_en.inc.php
Tried all those directories, one at the time:
.../template/{my_template}/.
.../template/{my_template}/lang/.
.../template/{my_template}/lang/UTF-8/.
.../template/{my_template}/UTF-8.
The value did not get picked up from those locations.
Cheers.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
Re: Language Files // Cached Entries
The correct values for those template lang files would be lang_*.inc.php and UTF-8/lang_*.inc.php, * being a placeholder for the language shortcode (e.g. “en” for English).johncanary wrote:The value did not get picked up from those locations.
Does your theme have a config.inc.php and does it contain code for loading these lang files? Some older template don't have that. Please see Bulletproof's or 2k11's config.inc.php for example code.
YL
Re: Language Files // Cached Entries
I dimly do remember (in the context of global nav lang constants) that core lang files constants are loaded prior like described by John.... (maybe lang_en.inc.php only? but that would not make sence either...)
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Thanks, yellowled,yellowled wrote:Does your theme have a config.inc.php and does it contain code for loading these lang files? Some older template don't have that. Please see Bulletproof's or 2k11's config.inc.php for example code.johncanary wrote:The value did not get picked up from those locations.
YL
That must be it. I did not try it out, yet, but looking into our 2k11 plugin it makes sense. And the config file was missing. My current template is based on the good old "competition" style with the coffee cup. Just too ancient.
Yours
John
P.S.: Seems like your 2k11 will do a lot of tricks.
Will there be any docu/FAQ for that template?
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Thanks, yellowled,yellowled wrote:Does your theme have a config.inc.php and does it contain code for loading these lang files? Some older template don't have that. Please see Bulletproof's or 2k11's config.inc.php for example code.johncanary wrote:The value did not get picked up from those locations.
YL
That must be it. I did not try it out, yet, but looking into our 2k11 plugin it makes sense. And the config file was missing. My current template is based on the good old "competition" style with the coffee cup. Just too ancient.
Yours
John
P.S.: Seems like your 2k11 will do a lot of tricks.
Will there be any docu/FAQ for that template? I remember you talked about it on s9yinfocamp, but that was some time ago and only for the German speaking peeps.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
Re: Language Files // Cached Entries
https://github.com/yellowled/s9y-2k11#readme covers pretty much all I have to say about 2k11. You might find more on 2k11 here in the forums.johncanary wrote:P.S.: Seems like your 2k11 will do a lot of tricks. Will there be any docu/FAQ for that template?
If you really want to get into it, modify or fork it, you're gonna have to be up to speed on current web techniques (HTML5, CSS3, a bit of JS/jQuery). That's not to show off my skills or something, it's just necessary in order to provide a state-of-the-art template for s9y.
If you just want to create your own color scheme (highly recommended) or tweak the layout a little, http://yellowled.github.io should help with that.
YL
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Excellent!
Merci.
Merci.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Now I have tested it with the latest 2k11 theme, version1.2.7.yellowled wrote:The correct values for those template lang files would be lang_*.inc.php and UTF-8/lang_*.inc.php, * being a placeholder for the language shortcode (e.g. “en” for English).johncanary wrote:The value did not get picked up from those locations.
Does your theme have a config.inc.php and does it contain code for loading these lang files? Some older template don't have that. Please see Bulletproof's or 2k11's config.inc.php for example code.
YL
I can add new constants via the template but cannot overwrite any global language definitions. Obviously the global language file gets loaded before the template specific ones. That means I cannot change globally defined language terms with the template.
I either change the global language file myself or use the serendipity_config.local.inc.php file to take care of changes.
I think for future updates I will use the diff and patch utilities and keep modifying the global language files to my liking myself. With those tools it should be easier to track all the changes.
Thanks for your support anyway.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
Re: Language Files // Cached Entries
I imagine this to be quite a bit of work still. of course we don't have very frequent updates to the core, so one would only need to do this once or twice a year max, but still – we should think about a mechanism (a plugin, probably) to make this easier in the future.johncanary wrote:I think for future updates I will use the diff and patch utilities and keep modifying the global language files to my liking myself. With those tools it should be easier to track all the changes.
YL
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
I used the notepad++ text editor to do that. With the compare plugin installed you see the differences between the old and new language files easily and can edit the new file right away. But, yeah, it is tedious work. And I was prepared to know what files I had changed (not only language files but that's a different story.)yellowled wrote:I imagine this to be quite a bit of work still. […] we should think about a mechanism (a plugin, probably) to make this easier in the future. ~YL
A minimum requirement would be to make sure local changes to language files don't get wiped out by any update process. And a tool that lists those files that have changed similar to the integrity check for core files. Maybe that only needs to be extended to themes and plugins.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Language Files // Cached Entries
Nice to see you posting here again John!
I have tried different ways of changing global constants. I too wanted to do it via a template, but it never worked. I have been so busy with "life" lately that I just don't have much time for testing, but I will be following this thread and will help in any way I can!
I have tried different ways of changing global constants. I too wanted to do it via a template, but it never worked. I have been so busy with "life" lately that I just don't have much time for testing, but I will be following this thread and will help in any way I can!
=Don=
-
- Regular
- Posts: 116
- Joined: Mon Aug 20, 2007 4:00 am
- Location: Spain
- Contact:
Re: Language Files // Cached Entries
Hi Don,
Yes, that was probably the reason why I did not upgrade to a current version earlier. I did not want to mess with all those things. I knew it takes more time but now I must say it was not too bad of a time sucker. I have even cloned the blog to create a test bed for 2k11 (<blogdev1.fcon21.biz>).
Good to see that you are still breathing, too.
Yes, that was probably the reason why I did not upgrade to a current version earlier. I did not want to mess with all those things. I knew it takes more time but now I must say it was not too bad of a time sucker. I have even cloned the blog to create a test bed for 2k11 (<blogdev1.fcon21.biz>).
Good to see that you are still breathing, too.
Yours John
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14
: John's Google+ Profile
: John's E-Biz Booster Blog powered by Serendipity 1.7/PHP 5.3.14