Re: i18n problem

2014-10-22 Thread Lucky1968
Hi,

Here's an example:

I have an element which generates a navigation menu.

This is the code in the element:
App::import('Model', array('Shop.ShopCategory'));
$menuObj = new ShopCategory();
$nav_top = $menuObj->nav_top('');
ShopCategory has a translated 'name'-field which is also the models 
displayField.

In the element I have a:
foreach ($nav_top as $menuItem) {} loop

When I call this element from any other controller I can access the value 
of the name-field within this foreach-loop by:
$menuItem['ShopCategory']['name'] 
or $menuItem['ShopCategory'][$menuObj->displayField]

But when I'm in a page from the same 'shop_categories'-controller then 
$menuItem['ShopCategory']['name'] 
or $menuItem['ShopCategory'][$menuObj->displayField] (and all other 
translated keys) are empty.
But then I can find the desired value in 
$nav_top[0]['ShopCategory'][0]['ShopCategory__i18n_name']

Can anyone tell me what goes wrong here?

Thanx in advance.



On Tuesday, October 21, 2014 9:11:39 PM UTC+2, José Lorenzo wrote:
>
> First time I see this. What Cake version are you using?
>
> On Monday, October 20, 2014 8:56:39 AM UTC+2, Lucky1968 wrote:
>>
>> Hi,
>>
>> Is there anyone who can help me with this?
>>
>> Thanx.
>>
>> On Wednesday, October 1, 2014 9:32:05 AM UTC+2, Lucky1968 wrote:
>>>
>>> Hi,
>>>
>>> I'm using i18n in my application and it seems that in certain views I 
>>> can use $array['translated_field'] as in other views I need to use 
>>> $array[0]['Model__i18n_translated_field'] to get the same information 
>>> coming from the same find in the same model.
>>>
>>> Can anyone tell me why this is?
>>>
>>> This is my code:
>>>
>>> MY MODEL (SettingsSite.php):
>>> 
>>> class SettingsSite extends AppModel {
>>>
>>> public $actsAs = array(
>>> 'Translate' => array(
>>> 'slogan'
>>> )
>>> );
>>>
>>> ...
>>>
>>> public function first_site() {
>>> return $this->find('first', array('recursive' => -1));
>>> }
>>>
>>> }
>>> 
>>>
>>> MY VIEWS:
>>> 
>>> App::import('Model', array('SettingsSite'));
>>> $settingsSiteObj = new SettingsSite();
>>> $first_site = $settingsSiteObj->first_site();
>>> 
>>>
>>> RESULTS:
>>> In (almost) all my view files within my main application and in all my 
>>> view files in plugins I get the results like this:
>>>
>>> array(
>>> 'SettingsSite' => array(
>>> ...
>>> 'locale' => 'eng',
>>> 'slogan' => 'Translated Slogan'
>>> )
>>> )
>>>
>>> But in (apparently form-) view files in my main application I get the 
>>> results like this:
>>>
>>> array(
>>> 'SettingsSite' => array(
>>> ...
>>> 'locale' => 'eng',
>>> 'slogan' => ''
>>> ),
>>> (int) 0 => array(
>>> 'SettingsSite__i18n_slogan' => 'Translated Slogan'
>>> )
>>> )
>>>
>>> As said, all the code in the view files is identical and therefor 
>>> pointing to the same function in the same model. And the a.m. result code 
>>> is the result of debug() within the models function, so IMHO, shouldn't be 
>>> influenced by anything else in the view file.
>>>
>>> Can someone tell me why this is?
>>>
>>> Thanx.
>>>
>>> Luc
>>>
>>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: i18n problem

2014-10-21 Thread Luc Bernard
Hi,
I'm using 2.3.10



> On 21 Oct 2014, at 21:11, José Lorenzo  wrote:
> 
> First time I see this. What Cake version are you using?
> 
>> On Monday, October 20, 2014 8:56:39 AM UTC+2, Lucky1968 wrote:
>> Hi,
>> 
>> Is there anyone who can help me with this?
>> 
>> Thanx.
>> 
>>> On Wednesday, October 1, 2014 9:32:05 AM UTC+2, Lucky1968 wrote:
>>> Hi,
>>> 
>>> I'm using i18n in my application and it seems that in certain views I can 
>>> use $array['translated_field'] as in other views I need to use 
>>> $array[0]['Model__i18n_translated_field'] to get the same information 
>>> coming from the same find in the same model.
>>> 
>>> Can anyone tell me why this is?
>>> 
>>> This is my code:
>>> 
>>> MY MODEL (SettingsSite.php):
>>> 
>>> class SettingsSite extends AppModel {
>>> 
>>> public $actsAs = array(
>>> 'Translate' => array(
>>> 'slogan'
>>> )
>>> );
>>> 
>>> ...
>>> 
>>> public function first_site() {
>>> return $this->find('first', array('recursive' => -1));
>>> }
>>> 
>>> }
>>> 
>>> 
>>> MY VIEWS:
>>> 
>>> App::import('Model', array('SettingsSite'));
>>> $settingsSiteObj = new SettingsSite();
>>> $first_site = $settingsSiteObj->first_site();
>>> 
>>> 
>>> RESULTS:
>>> In (almost) all my view files within my main application and in all my view 
>>> files in plugins I get the results like this:
>>> array(
>>> 'SettingsSite' => array(
>>> ...
>>> 'locale' => 'eng',
>>> 'slogan' => 'Translated Slogan'
>>> )
>>> )
>>> But in (apparently form-) view files in my main application I get the 
>>> results like this:
>>> array(
>>> 'SettingsSite' => array(
>>> ...
>>> 'locale' => 'eng',
>>> 'slogan' => ''
>>> ),
>>> (int) 0 => array(
>>> 'SettingsSite__i18n_slogan' => 'Translated Slogan'
>>> )
>>> )
>>> As said, all the code in the view files is identical and therefor pointing 
>>> to the same function in the same model. And the a.m. result code is the 
>>> result of debug() within the models function, so IMHO, shouldn't be 
>>> influenced by anything else in the view file.
>>> 
>>> Can someone tell me why this is?
>>> 
>>> Thanx.
>>> 
>>> Luc
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
> 
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "CakePHP" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/cake-php/KXpXkUh2tHI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: i18n problem

2014-10-21 Thread José Lorenzo
First time I see this. What Cake version are you using?

On Monday, October 20, 2014 8:56:39 AM UTC+2, Lucky1968 wrote:
>
> Hi,
>
> Is there anyone who can help me with this?
>
> Thanx.
>
> On Wednesday, October 1, 2014 9:32:05 AM UTC+2, Lucky1968 wrote:
>>
>> Hi,
>>
>> I'm using i18n in my application and it seems that in certain views I can 
>> use $array['translated_field'] as in other views I need to use 
>> $array[0]['Model__i18n_translated_field'] to get the same information 
>> coming from the same find in the same model.
>>
>> Can anyone tell me why this is?
>>
>> This is my code:
>>
>> MY MODEL (SettingsSite.php):
>> 
>> class SettingsSite extends AppModel {
>>
>> public $actsAs = array(
>> 'Translate' => array(
>> 'slogan'
>> )
>> );
>>
>> ...
>>
>> public function first_site() {
>> return $this->find('first', array('recursive' => -1));
>> }
>>
>> }
>> 
>>
>> MY VIEWS:
>> 
>> App::import('Model', array('SettingsSite'));
>> $settingsSiteObj = new SettingsSite();
>> $first_site = $settingsSiteObj->first_site();
>> 
>>
>> RESULTS:
>> In (almost) all my view files within my main application and in all my 
>> view files in plugins I get the results like this:
>>
>> array(
>>  'SettingsSite' => array(
>>  ...
>>  'locale' => 'eng',
>>  'slogan' => 'Translated Slogan'
>>  )
>> )
>>
>> But in (apparently form-) view files in my main application I get the 
>> results like this:
>>
>> array(
>>  'SettingsSite' => array(
>>  ...
>>  'locale' => 'eng',
>>  'slogan' => ''
>>  ),
>>  (int) 0 => array(
>>  'SettingsSite__i18n_slogan' => 'Translated Slogan'
>>  )
>> )
>>
>> As said, all the code in the view files is identical and therefor 
>> pointing to the same function in the same model. And the a.m. result code 
>> is the result of debug() within the models function, so IMHO, shouldn't be 
>> influenced by anything else in the view file.
>>
>> Can someone tell me why this is?
>>
>> Thanx.
>>
>> Luc
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: i18n problem

2014-10-19 Thread Lucky1968
Hi,

Is there anyone who can help me with this?

Thanx.

On Wednesday, October 1, 2014 9:32:05 AM UTC+2, Lucky1968 wrote:
>
> Hi,
>
> I'm using i18n in my application and it seems that in certain views I can 
> use $array['translated_field'] as in other views I need to use 
> $array[0]['Model__i18n_translated_field'] to get the same information 
> coming from the same find in the same model.
>
> Can anyone tell me why this is?
>
> This is my code:
>
> MY MODEL (SettingsSite.php):
> 
> class SettingsSite extends AppModel {
>
> public $actsAs = array(
> 'Translate' => array(
> 'slogan'
> )
> );
>
> ...
>
> public function first_site() {
> return $this->find('first', array('recursive' => -1));
> }
>
> }
> 
>
> MY VIEWS:
> 
> App::import('Model', array('SettingsSite'));
> $settingsSiteObj = new SettingsSite();
> $first_site = $settingsSiteObj->first_site();
> 
>
> RESULTS:
> In (almost) all my view files within my main application and in all my 
> view files in plugins I get the results like this:
>
> array(
>   'SettingsSite' => array(
>   ...
>   'locale' => 'eng',
>   'slogan' => 'Translated Slogan'
>   )
> )
>
> But in (apparently form-) view files in my main application I get the 
> results like this:
>
> array(
>   'SettingsSite' => array(
>   ...
>   'locale' => 'eng',
>   'slogan' => ''
>   ),
>   (int) 0 => array(
>   'SettingsSite__i18n_slogan' => 'Translated Slogan'
>   )
> )
>
> As said, all the code in the view files is identical and therefor pointing 
> to the same function in the same model. And the a.m. result code is the 
> result of debug() within the models function, so IMHO, shouldn't be 
> influenced by anything else in the view file.
>
> Can someone tell me why this is?
>
> Thanx.
>
> Luc
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: i18n problem

2014-10-01 Thread Lucky1968
UPDATE: I also have to use $array[0]['Model__i18n_translated_field'] in 
normal (not forms) view files.

On Wednesday, October 1, 2014 9:32:05 AM UTC+2, Lucky1968 wrote:
>
> Hi,
>
> I'm using i18n in my application and it seems that in certain views I can 
> use $array['translated_field'] as in other views I need to use 
> $array[0]['Model__i18n_translated_field'] to get the same information 
> coming from the same find in the same model.
>
> Can anyone tell me why this is?
>
> This is my code:
>
> MY MODEL (SettingsSite.php):
> 
> class SettingsSite extends AppModel {
>
> public $actsAs = array(
> 'Translate' => array(
> 'slogan'
> )
> );
>
> ...
>
> public function first_site() {
> return $this->find('first', array('recursive' => -1));
> }
>
> }
> 
>
> MY VIEWS:
> 
> App::import('Model', array('SettingsSite'));
> $settingsSiteObj = new SettingsSite();
> $first_site = $settingsSiteObj->first_site();
> 
>
> RESULTS:
> In (almost) all my view files within my main application and in all my 
> view files in plugins I get the results like this:
>
> array(
>   'SettingsSite' => array(
>   ...
>   'locale' => 'eng',
>   'slogan' => 'Translated Slogan'
>   )
> )
>
> But in (apparently form-) view files in my main application I get the 
> results like this:
>
> array(
>   'SettingsSite' => array(
>   ...
>   'locale' => 'eng',
>   'slogan' => ''
>   ),
>   (int) 0 => array(
>   'SettingsSite__i18n_slogan' => 'Translated Slogan'
>   )
> )
>
> As said, all the code in the view files is identical and therefor pointing 
> to the same function in the same model. And the a.m. result code is the 
> result of debug() within the models function, so IMHO, shouldn't be 
> influenced by anything else in the view file.
>
> Can someone tell me why this is?
>
> Thanx.
>
> Luc
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


i18n problem

2014-10-01 Thread Lucky1968
Hi,

I'm using i18n in my application and it seems that in certain views I can 
use $array['translated_field'] as in other views I need to use 
$array[0]['Model__i18n_translated_field'] to get the same information 
coming from the same find in the same model.

Can anyone tell me why this is?

This is my code:

MY MODEL (SettingsSite.php):

class SettingsSite extends AppModel {

public $actsAs = array(
'Translate' => array(
'slogan'
)
);

...

public function first_site() {
return $this->find('first', array('recursive' => -1));
}

}


MY VIEWS:

App::import('Model', array('SettingsSite'));
$settingsSiteObj = new SettingsSite();
$first_site = $settingsSiteObj->first_site();


RESULTS:
In (almost) all my view files within my main application and in all my view 
files in plugins I get the results like this:

array(
'SettingsSite' => array(
...
'locale' => 'eng',
'slogan' => 'Translated Slogan'
)
)

But in (apparently form-) view files in my main application I get the 
results like this:

array(
'SettingsSite' => array(
...
'locale' => 'eng',
'slogan' => ''
),
(int) 0 => array(
'SettingsSite__i18n_slogan' => 'Translated Slogan'
)
)

As said, all the code in the view files is identical and therefor pointing 
to the same function in the same model. And the a.m. result code is the 
result of debug() within the models function, so IMHO, shouldn't be 
influenced by anything else in the view file.

Can someone tell me why this is?

Thanx.

Luc

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


I18N problem with default language (FIXED)

2010-05-26 Thread massl
Hi,

I've noticed that the google bot indexed the language keys instead of
the translation. I could reproduce this by doing a telnet and a
"GET /" (it doesn't matter what site).

CakePHP caches the language files and for some reason it tried to load
"cake_core_default_en_us" instead of the default language. It didn't
matter if I chose "deu" or "eng" as default language - it always
loaded en_us. The bad thing is that Cake caches  [LC_MESSAGES]
[$my_default_language][default] as an empty array instead of trying to
load the correct language and so it doesn't translate.
The function I18n::translate() has this array in $_this->__domains.
For that reason it's not trying to translate it.

The problem could be "solved" by copying the cache file
"cake_core_default_$my_default_language" to "cake_core_default_en_us".
I could also "fix" it by changing the line "if (!isset($_this-
>__domains[$_this->category][$_this->__lang][$domain])) {" to "if (!
isset($_this->__domains[$_this->category][$_this->__lang][$domain]) ||
sizeof($_this->__domains[$_this->category][$_this->__lang][$domain] ==
0)) {".
So I have forced cake to re-read the language file if it doesn't
contain anything.

This happened with CakePHP 1.2.6 as well as 1.2.7.

But enough of this blah. The problem was, that I've used __() in
bootstrap.php - which was obviously bad, because Cake didn't know
anything about the default language *doh*. I don't think it's a real
bug, but it may be considered somewhere.


cheers,

massl

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: special i18n problem

2009-04-13 Thread donnerbeil

Thanks for your comments.
I'll think about it. But I don't understand, what you mean with using
views. The only way I think views are useful in this case is, that I
check in a foreach loop if the contents country_id equals the given
one and skip all other. Maybe that's a solution.

I still think it's quite tricky, because at least in the more complex
find() calls cake is not able to sort out the ones with the wrong
country_id as cake gets some resultsets by making more than one sql
query. In these cases I can't use country_id in where clause.

@John
Actually all content is country specific. But users should be able to
switch the country and keep their login name and passwort. Otherwise,
the best solution would be a different website for each country. If
you live in germany for example you can switch to Austria or
Switzerland and look in the event calender for those countries, as
their main language is also German. Same thing for USA and Canada.

The presentation language is not the problem. That's quite easy done
with the po-files.

Well, I'll try out a few things and post the best solution, when I'm
done.

Happy Eastern

Donnerbeil

On 8 Apr., 08:05, John Andersen  wrote:
> If I understand you correctly, then you have content that are not
> related to a specific country and you have country specific content.
>
> One thing is to use I10n to change the presentation language, the
> other is to change the content from non specific to country specific.
> In that case you may look 
> athttp://book.cakephp.org/view/72/Additional-Methods-and-Properties
> for defining your own functions when the country specific content has
> been chosen.
>
> Hope this helps you on the way,
> Enjoy,
>    John
>
> On Apr 8, 1:57 am,donnerbeil wrote:
>
> > Hi,
>
> > I have a community website. At the moment it's only in German, but I'm
> > trying to get it international. Of course there are a lot of useful
> > l10n and i18n classes in cake, but in my case I need something else.
>
> > The content for each country is totally different. I don't need to
> > have translated content. For example I have events for each country.
> > So if you switch to the italian version of the website, only the
> > events in Italy should be visible in the event calendar. Same thing
> > with some other model data.
>
> > Is there any convenient way to tell cake that it should look for a
> > country_id in the models db-table and if it exists, then only data
> > with the given country_id should be found via find('all'), find
> > ('list', paginate() etc.
>
> > I was thinking of an afterFind() method, that checks if the country_id
> > is set in the result array and then unsets all array keys where the
> > country_id doesn't equal the given country_id. Do you have any other
> > ideas? I'm just not sure, if this is the best way to do it.
>
> > Thanks in advance
>
> >Donnerbeil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: special i18n problem

2009-04-07 Thread John Andersen

If I understand you correctly, then you have content that are not
related to a specific country and you have country specific content.

One thing is to use I10n to change the presentation language, the
other is to change the content from non specific to country specific.
In that case you may look at 
http://book.cakephp.org/view/72/Additional-Methods-and-Properties
for defining your own functions when the country specific content has
been chosen.

Hope this helps you on the way,
Enjoy,
   John

On Apr 8, 1:57 am, donnerbeil  wrote:
> Hi,
>
> I have a community website. At the moment it's only in German, but I'm
> trying to get it international. Of course there are a lot of useful
> l10n and i18n classes in cake, but in my case I need something else.
>
> The content for each country is totally different. I don't need to
> have translated content. For example I have events for each country.
> So if you switch to the italian version of the website, only the
> events in Italy should be visible in the event calendar. Same thing
> with some other model data.
>
> Is there any convenient way to tell cake that it should look for a
> country_id in the models db-table and if it exists, then only data
> with the given country_id should be found via find('all'), find
> ('list', paginate() etc.
>
> I was thinking of an afterFind() method, that checks if the country_id
> is set in the result array and then unsets all array keys where the
> country_id doesn't equal the given country_id. Do you have any other
> ideas? I'm just not sure, if this is the best way to do it.
>
> Thanks in advance
>
> Donnerbeil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: special i18n problem

2009-04-07 Thread faza

If your database supports it, I'd suggest using views.
It's much faster than re-filtering the results in Cake, especially that
you can create views using SQL code on-the-fly.
This way you could still use a single model but change the $uses value
dynamically. (A theory, haven't tested it)

Still, I'd give a shot with views.


>
> Hi,
>
> I have a community website. At the moment it's only in German, but I'm
> trying to get it international. Of course there are a lot of useful
> l10n and i18n classes in cake, but in my case I need something else.
>
> The content for each country is totally different. I don't need to
> have translated content. For example I have events for each country.
> So if you switch to the italian version of the website, only the
> events in Italy should be visible in the event calendar. Same thing
> with some other model data.
>
> Is there any convenient way to tell cake that it should look for a
> country_id in the models db-table and if it exists, then only data
> with the given country_id should be found via find('all'), find
> ('list', paginate() etc.
>
> I was thinking of an afterFind() method, that checks if the country_id
> is set in the result array and then unsets all array keys where the
> country_id doesn't equal the given country_id. Do you have any other
> ideas? I'm just not sure, if this is the best way to do it.
>
> Thanks in advance
>
> Donnerbeil
>
>
> >
>



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



special i18n problem

2009-04-07 Thread donnerbeil

Hi,

I have a community website. At the moment it's only in German, but I'm
trying to get it international. Of course there are a lot of useful
l10n and i18n classes in cake, but in my case I need something else.

The content for each country is totally different. I don't need to
have translated content. For example I have events for each country.
So if you switch to the italian version of the website, only the
events in Italy should be visible in the event calendar. Same thing
with some other model data.

Is there any convenient way to tell cake that it should look for a
country_id in the models db-table and if it exists, then only data
with the given country_id should be found via find('all'), find
('list', paginate() etc.

I was thinking of an afterFind() method, that checks if the country_id
is set in the result array and then unsets all array keys where the
country_id doesn't equal the given country_id. Do you have any other
ideas? I'm just not sure, if this is the best way to do it.

Thanks in advance

Donnerbeil


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