Usage of the Language-field in the Static Pages plugin

Creating and modifying plugins.
Post Reply
camil7
Regular
Posts: 7
Joined: Sun May 26, 2013 1:56 pm
Location: Berlin, Germany

Usage of the Language-field in the Static Pages plugin

Post by camil7 »

I noticed that the "Static Pages" plugin has a "Language" field in the edit form in the backend, but I cannot see where it is used in the frontend.
I manually patched the plugin, so it uses it as the {$lang} variable in the public page, but I guess that is not the intended use for it ... well, it works for me, but I wonder what I might have broken by doing that.

Any pointers?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Usage of the Language-field in the Static Pages plugin

Post by garvinhicking »

Hi!

The Language field is meant so that when people use multilingual blogs (with the languagechooser plugin, or simply when authors are logged in that have a different language set in their personal configuration). Using the field, staticpage entries can be created that each have a specific translation and will show up only in the currently active language...

Does that help? ;)

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/
camil7
Regular
Posts: 7
Joined: Sun May 26, 2013 1:56 pm
Location: Berlin, Germany

Re: Usage of the Language-field in the Static Pages plugin

Post by camil7 »

Yes, that does help, thanks! :)
I do not have a multi language blog, so I plain forgot about that possibility. Just looks like me ;)
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Re: Usage of the Language-field in the Static Pages plugin

Post by wesley »

I think something's broken with the plugin regarding multi-language support in the recent versions. I've been attempting to update old static pages and create new ones, but these all generate the following error:

Unknown column 'language' in 'field list'

Any ideas on resolving this issue would be appreciated.
I make s9y plugins, too.
My s9y blog depends on them. :)
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Re: Usage of the Language-field in the Static Pages plugin

Post by wesley »

Upon further analysis, the DB table indeed did not have 'language' column. It was somehow not added after the plugin was updated to use it. I manually inserted the column and now things work correctly.
I make s9y plugins, too.
My s9y blog depends on them. :)
Post Reply