Thanks [EMAIL PROTECTED],

Your response handles the translation of static 'interface' elements
of the application. For example translations of static menu items in
multiple languages based on the language setting made the user. I mean
something different.

What I mean is for example a database with news articles. For every
article there is a version in each language supported by the website.
Based on the language settings made by the user a localised copy of
the article is shown. If a localised version of the article is  not
available than the version in the default site language is shown, for
example English.

Symfony uses a table structure like this:

Table: news
Fields: id, ...

Table news_i18n
Fields: id, news_id, language, title, content, ...

News is the main table. News_i18n is the table where the different
translated version of each article is saved. For each article there is
one records in the i18n table.

For example:
Record 1 in table news:
id: 1

Records in table news_i18n:
id: 1
news_id: 1
language: en

id: 2
news_id: 1
language: fr

id: 3
news_id: 1
language: du

Based on the requested news id and the language setting a record is
fetched from the news_i18n table.

It looks like the 1.2 version of Cake has functions for this kind of
setup. Questions is how do we use it!

Thanks,


On May 31, 6:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Here are the notes I have collected so far on using i18n in 1.2...
>
> Internationalization (i18n)
>
>     * at top of controller: uses('L10n');
>     * create /app/locale/eng/LC_MESSAGES/default.po (French is fre/
> fra)
>           ohttp://www.loc.gov/standards/iso639-2/php/code_list.php
>     * create entries in default.po as such:
>
> msgid  "close_window"
> msgstr "Close"
>
> msgid  "where_pin"
> msgstr "Where is my PIN?"
>
>     * call translations in view: <?__("close_window")?> )
> ("close_window" is msgid from default.po)
>           o this is going to echo out the msgstr for the given msgid,
> else it wil display the msgid given
>           o use __("button_submit", true) to return the value as
> opposed to echoing it
>     * you can specify different languages as such:
>
> $this->L10n = new L10n();
> $this->L10n->get('eng');
>
> On May 30, 2:53 am, oleonav <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
>
> > For an upcomming project, a mutilangual site, I need the ability to
> > store different versions of the same content in a database. I've been
> > evaluating both Cake & Symfony as basis for this site.
>
> > Although I do like Cake for it's low footprint and simplicity to make
> > things work I need something like the the translation feaute build in
> > Symfony for i18n content. I've noticed that i18n is a feature of the
> > upcoming 1.2 release of Cake.
>
> > Questions?
> > 1. Does anyone has a working solutions or documentation on how to
> > implement i18n in the new 1.2. version.
> > 2. What will be the appro. relase date of Cake 1.2
>
> > Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to