I have found my error: Correct is: uses('L10n'); class OrtmastersController extends AppController {
In this case this is a function and not a variable $uses as needed when you import a model. Why this is different I still have no clue. Anja -----Ursprüngliche Nachricht----- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Liebermann, Anja Carolin Gesendet: Dienstag, 14. Oktober 2008 18:11 An: cake-php@googlegroups.com Betreff: AW: localization Hi Claudia, Since you got it workling you might be able to help: In the cookbook (http://manual.cakephp.org/view/162/Localizing-Your-Application) it says to include the L10n like this: $uses('L10n'); class RecipesController extends AppController { //... } I am just wonderung: normally you include other classes (like other models) like this: class RecipesController extends AppController { var $uses('Somemodel'); //... } Does anyone know why this is different? Anyway... Neither seams to work :-( Thanks Anja -----Ursprüngliche Nachricht----- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Claudia Gesendet: Mittwoch, 17. September 2008 16:02 An: CakePHP Betreff: Re: localization Hi there I haven't read the article, so I am not sure whether this fits in with whatever the article says. I always use utf-8 as character encoding and never had any troubles with Cake localisation. In the views you simply use the function __() (or one of the other translation functions) to get the translations of your messages. Just remember to enable l10n in the corresponding controllers. The models are a bit more complicated, as you cannot call a function in the declaration of a class member (the $validate array). I simply gave the appModel a function loadValidation which is called in the constructor. This loadValidation() function then fills the class member $validate with the validation array. Please note that I had to load L10n already in the bootstrap, as otherwise the error messages always appear in the default language (english). I believe this is because the models are loaded before the controllers, but I am not sure. I use Cake 1.2.0.5427alpha Good luck Claudia On Sep 17, 2:28 am, cem <[EMAIL PROTECTED]> wrote: > Hi ; > I am reading the localization article in the cakePHP . And in that > article it says that I have to include the uses('L10n'); in the > controllers I want to use . But I want to change the validation errors > in the models and some messages in the views what should I do ? > > The second question about that is it is using the ISO639-2 character > encoding . What should I put in the doctype of my default.ctp ? Can > anyone give me an example of Doctypes in Cakephp ? For various > Languages please ? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---