On 23 January 2013 06:29, Simon Schick <[email protected]> wrote:
>
> I'm fairly new to Habari and want to know if it's possible to create a blog
> supporting entries in different languages.
> My goal is, to create a blog, where I can write articles in different
> languages, depending on the level of difficulty. Articles containing fairly
> simple stuff, will just be available in German and maybe Polish and some
> other articles, where I write about some rare edge-cases, I want to have in
> English.
>
> Therefore the blog itself needs to be available in multiple languages and
> the posts need to have the possibility to be translated. If a post is not
> translated, it will be shown in one of the available languages, chosen by a
> language-fallback-array ( [pl, de, en] ).

The simplest way to do this would be to save the translations as post
info records. This would involve a plugin that did something like:

* Allow the blog owner to configure the available languages.
* Add a way to select from those languages on the publish page or just
provide multiple content areas.
* When the post is saved, save the available languages and alternate
content to post info fields.
* Filter calls to $post->content_out, check what language should be
output in this case and return either the original content or
alternate content.

You probably also want to filter $post->excerpt_out and you may want
to do the same thing with the title.

If you're a coder you could probably write the plugin with help from
this mailing list, on IRC, and the documentation
(http://wiki.habariproject.org/en/). If you're not a coder, you could
probably say "that sounds awesome!" and someone might write it for
you.

--
Michael C. Harris
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to