Right, you:

Configure::write('Config.language', 'whatever');

Your current code uses the session in some way when deciding what language to 
write? Fine for when your code is running as a web site where there is a 
session, but for cases when you're running without a session, like in a shell 
script, you'll want to have a different method for selecting what language to 
write into the config.

On Feb 17, 2011, at 15:21, John Andersen wrote:

> Use the Configure statement as specified in the CakePHP book at:
> http://book.cakephp.org/#!/view/1230/Localization-in-CakePHP
> 
> Enjoy,
>   John
> 
> On Feb 17, 6:44 pm, DigitalDude <[email protected]> wrote:
>> Hey,
>> 
>> I ran into a problem the other day, and I don't know what to do right
>> now.
>> 
>> I have a shell which is run as a cronjob, and this shell/cronjob sends
>> weekly status reports about a users work-environment. In these emails,
>> there is text as gettext and sometimes even i18n models with specific
>> language-depending content.
>> 
>> My problem is: How can I set a Session Language or a locale for the
>> content? In a shell I don't have a Session and I've never seen
>> anything like this before. So does anyone have a clue what's best
>> practice for this kind of stuff?




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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

Reply via email to