Internationalization & Localization in Cakephp switching languages

2015-08-05 Thread yusuf elhirar
Hello guys, I started to make a website in 3 different languages: French, English and Arabic. Therefore, I would like to know how to switch language and using a link in the view. I already extract PO file for French and configure the website for French (on the bootstrap file), but I want to kno

Localization: some string doesn't get translated

2014-07-02 Thread Lorenzo Milesi
Hi. I've a weird problem with my Cake (2.0.6) app, where some strings get translated and some don't. Source language is Eng, I added localization for Ita. This is the view file login.cpt: echo $this->Form->submit(__('Login')); echo $this->Html->link(__('S

Re: Localization extract comments

2014-02-10 Thread AD7six
On Monday, 10 February 2014 14:22:10 UTC+1, John Doe wrote: > > Hi, > > can I do something like that in CakePHP? > > /// TRANSLATORS: Please leave %s as it is, because it is needed by the > program./// Thank you for contributing to this project.printf(_("My name is > %s.\n"), my_name); > > Not

Localization extract comments

2014-02-10 Thread John Doe
Hi, can I do something like that in CakePHP? /// TRANSLATORS: Please leave %s as it is, because it is needed by the program./// Thank you for contributing to this project.printf(_("My name is %s.\n"), my_name); Then extract, so I get my POT File like this: #. TRANSLATORS: Please leave %s a

Re: CakePhp 2.x - Internationalization/Localization/Translate Behavior/i18n - How to use in 2.x?

2013-04-14 Thread Livin Inchina
Hi Kicaj and thanks for your post, I stumbled upon it before to start the internationalization of project. It was helpful but my main problem is that I can't save data with validation, I have to turn them off on my save($data,false) and I can't figure why it won't work! -- Like Us on FaceBook

Re: CakePhp 2.x - Internationalization/Localization/Translate Behavior/i18n - How to use in 2.x?

2013-04-09 Thread kicaj
Read my article on bakery site: http://bakery.cakephp.org/articles/kicaj/2013/01/27/internationalization_with_static_and_dynamic_content_routing_and_switching W dniu wtorek, 2 kwietnia 2013 05:06:25 UTC+2 użytkownik Livin Inchina napisał: > > Hi everyone! > > I'm having a hard time making my web

CakePhp 2.x - Internationalization/Localization/Translate Behavior/i18n - How to use in 2.x?

2013-04-02 Thread Livin Inchina
Hi everyone! I'm having a hard time making my website multilingual and I after going through the net seeking for answers, I found out that I wasn't the first one to have these issues with version 2.x. I'm trying to translate my blog. So I have a Post.php model, a PostsController.php and a view

Re: CakePHP 2.0.5 and localization

2013-01-24 Thread euromark
@vanessa you might want to look into http://book.cakephp.org/2.0/en/appendices/2-3-migration-guide.html#l10n the french folder should be "fra" instead of "fre" for >= 2.3 Am Donnerstag, 24. Januar 2013 16:20:38 UTC+1 schrieb vanessa v: > > I'm having an issue with this too. I'm using French th

Re: CakePHP 2.0.5 and localization

2013-01-24 Thread euromark
Some of those translation strings went into the "cake" domain __d('cake', ...); check the online source or the "Localized" plugin on how to make it work again and translations for it. In the end you just need to move those strings from default.po into cake.po (or run extract once more)

Re: CakePHP 2.0.5 and localization

2013-01-24 Thread vanessa v
I'm having an issue with this too. I'm using French though. On Wednesday, January 18, 2012 1:51:28 AM UTC-5, ZoRRo wrote: > > I used CakePHP 1.3, I want to migrate to version 2. > I have a problem of translation (russian lang), used po-file (app/ > Locale/rus/LC_MESSAGES/default.po). > echo __(

Localization in Themes

2012-11-23 Thread frent
Hi! I'm creating a website with multiple Themes and for each Theme the translation can be different or they can use different words in the Theme. Is it somehow possible to create a locale just for that Theme? So far I managed to use the __d() function and for each theme to have its own .po fi

CakePHP 2.0.5 and localization

2012-01-17 Thread ZoRRo
I used CakePHP 1.3, I want to migrate to version 2. I have a problem of translation (russian lang), used po-file (app/ Locale/rus/LC_MESSAGES/default.po). echo __('January') - work successfully echo $this->Form->input('var', array('type' => 'date', 'dateFormat' => 'DMY)) - displays the English name

Re: Different localization phrase

2012-01-04 Thread Miles J
Believe its not possible to show them all on one page. Someone correct me if I am wrong. On Jan 4, 6:57 am, "Constantin.FF" wrote: > I need to translate several phrases into different from the current > language. > If I write __('Title') I get it in the current language set in the > session. How

Different localization phrase

2012-01-04 Thread Constantin.FF
I need to translate several phrases into different from the current language. If I write __('Title') I get it in the current language set in the session. How to get it in the other languages? For example I need to get 'Title' translated into French, Italian, German ... on one page -- Our newest s

Re: Cake 1.3 and localization of time and date

2012-01-02 Thread 清水紘己
You need to see following section of the manual with "LC_TIME" keyword: http://book.cakephp.org/2.0/en/appendices/new-features-in-cakephp-1-3.html?highlight=lc_time The Book seems to be unkind for it, TimeHelper, not appendices, document should have detail information I think! 2012/1/3 MetZ : > Hi

Cake 1.3 and localization of time and date

2012-01-02 Thread MetZ
Hi all. I am currently "struggling" with localizing my created and modified values from db. I am using the Time helper, and have tried to get it to output real nice. echo $time->niceShort($post['Post']['created']); This gived me the Today, Yesterday, and Dec 29th 2011, 23:33 Translating of the

Re: Localization in Cakephp problems

2011-07-10 Thread Davor Ilic
t kind of Question. So the > > > > only thing i can say delete the cached po file /tmp/cache. Maybe > thats > > > > it, if not i think we need more code examples. > > > > > > On 7 Jul., 19:16, webfacer wrote: > > > > > > > i have some en

Re: Localization in Cakephp problems

2011-07-10 Thread euromark
thing i can say delete the cached po file /tmp/cache. Maybe thats > > > it, if not i think we need more code examples. > > > > On 7 Jul., 19:16, webfacer wrote: > > > > > i have some english hardcoded text that i want to change when i´m > > > > switch to engl

Re: Localization in Cakephp problems

2011-07-10 Thread Davor Ilic
. Maybe thats > > it, if not i think we need more code examples. > > > > On 7 Jul., 19:16, webfacer wrote: > > > > > > > > > > > > > > > > > i have some english hardcoded text that i want to change when i´m > > > switch to en

Re: Localization in Cakephp problems

2011-07-10 Thread euromark
nk we need more code examples. > > On 7 Jul., 19:16, webfacer wrote: > > > > > > > > > i have some english hardcoded text that i want to change when i´m > > switch to english language. > > i try the "localization in CakePHP" and it works well but so

Re: Localization in Cakephp problems

2011-07-10 Thread runckel
switch to english language. > i try the "localization in CakePHP" and it works well but some of the > words won´t change : > > msgid  "Name" > msgstr "Name" > > msgid  "Telefonnr." > msgstr "Telephone-Nr." > > msg

Re: problems with "Localization in Cakephp" eng -> default.po

2011-07-09 Thread Davor Ilic
ok hmm now when i got help it work but don´t know why. I use the following to translate: routse.php -> i define the lang param Router::connect('/:lang/:controller/:action/*',.); then i use the $this->params['lang'] to switch the langauage then here i define it to switch it Configure

Re: problems with "Localization in Cakephp" eng -> default.po

2011-07-08 Thread Ryan Schmidt
You'll need to provide us with *some* information in order for us to be able to begin to help you. For example, show us the code where "Senden" is being printed. Show us how your locale is being set. Why does the msgid "Telefonnr." exist twice in your file? On Jul 8, 2011, at 05:14, Davor Ilic

Re: problems with "Localization in Cakephp" eng -> default.po

2011-07-08 Thread Davor Ilic
hmmm does anybody no this issue? 2011/7/7 Davor Ilic > It works well, but in some views wehere is use some translations they do > not work well. > this sheet i use to translate the hardcoded text in my view (I will mark > which do not work): > > msgid "Name" > msgstr "Name" > > msgid "Telefonn

Localization in Cakephp problems

2011-07-08 Thread webfacer
i have some english hardcoded text that i want to change when i´m switch to english language. i try the "localization in CakePHP" and it works well but some of the words won´t change : msgid "Name" msgstr "Name" msgid "Telefonnr." msgstr "Telepho

Hi, routing problem localization

2011-06-05 Thread m16u31
I'm trying to translate my application, works fine but I have a problem when changing the language, mi default language is english, but also work with Spanish this is my url has the lang tag. http://localhost/caketra/articles/index/lang:eng but my intention is to display in this way http://loc

Re: localization and cache

2011-05-12 Thread Lorenzo Bettini
renzo Bettini wrote: Hi I started to localize my application adding a new language (I've always used _( )) in my code. If cache is enabled, and the language is changed, those strings are not translated again, am I right? What is then the right way to make language switch in the presence of lo

Re: localization and cache

2011-05-12 Thread Miles J
to localize my application adding a new language (I've always > used _( )) in my code. > > If cache is enabled, and the language is changed, those strings are not > translated again, am I right? > > What is then the right way to make language switch in the presence of >

localization and cache

2011-05-12 Thread Lorenzo Bettini
Hi I started to localize my application adding a new language (I've always used _( )) in my code. If cache is enabled, and the language is changed, those strings are not translated again, am I right? What is then the right way to make language switch in the presence of localiz

Re: USE Internationalization & Localization

2011-04-01 Thread hoss7
thanks daniel On Apr 1, 6:45 pm, "Daniel S. Reichenbach" wrote: > Greetings, > > > i am new in cakephp,how can user choice language? > > As a primer, read this > one:http://book.cakephp.org/view/1228/Internationalization-Localization > > and this q

Re: USE Internationalization & Localization

2011-04-01 Thread Daniel S. Reichenbach
Greetings, i am new in cakephp,how can user choice language? As a primer, read this one: http://book.cakephp.org/view/1228/Internationalization-Localization and this question has a nice summary of what to do. http://ask.cakephp.org/questions/view/multilanguage_site_in_cakephp And if you are

Re: USE Internationalization & Localization

2011-04-01 Thread hoss7
i am new in cakephp,how can user choice language? if i have website with default language :English ; how can user choice another language for xample farsi? and how can i find out user language choice in controls and view and model? On Apr 1, 5:05 pm, Ryan Schmidt wrote: > On Apr 1, 2011, at 07:48

Re: USE Internationalization & Localization

2011-04-01 Thread Ryan Schmidt
On Apr 1, 2011, at 07:48, hoss7 wrote: > how can i call file from local folder from url? > > for example i have : > >/app/locale/eng/LC_MESSAGES/default.po (English) >/app/locale/fa/LC_MESSAGES/default.po (farsi) > > how can i create url for call other po files? What do you mean, URL?

USE Internationalization & Localization

2011-04-01 Thread hoss7
how can i call file from local folder from url? for example i have : /app/locale/eng/LC_MESSAGES/default.po (English) /app/locale/fa/LC_MESSAGES/default.po (farsi) how can i create url for call other po files? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cak

Re: Proper way to handle empty localization strings?

2010-04-20 Thread O.J. Tibi
Oh, and by the way, a follow up tip: if you need to embed variable values INSIDE your translation strings, you may want to use sprintf() and named parameters for argument swapping. Check http://php.net/sprintf for details on these. Cheers again! Check out the new CakePHP Questions site http://cak

Re: Proper way to handle empty localization strings?

2010-04-20 Thread O.J. Tibi
Now I got your point. The thing is, Gettext (the translation that lots of applications implement, not just CakePHP) works in a way that if there are no message strings in the specified language that are found corresponding to the message id, then the message id itself will be returned. The obvious

Re: Proper way to handle empty localization strings?

2010-04-19 Thread Vesa Jääskeläinen
Hi, That can be the Cake's way but that is not a good way to make it. Using msgid's (or keys if you prefer) to lookup the localization database is much better way as then you have full power to differentiate when needed the case when some specific case is only different in one of the

Re: Proper way to handle empty localization strings?

2010-04-19 Thread Vesa Jääskeläinen
ample with less verbose to screen: "[years] years, [months] months and [days] days." Now if one wants to hide the begin part obivious idea is to just define empty string for begin-message. Other example might be: "Event occurs every [years] years [months] months [days] days." (delimete

Re: Proper way to handle empty localization strings?

2010-04-18 Thread Miles J
The proper way in Cake to do l10n is to use full sentences. Not keys/ slugs for the msgids. By doing so you can use Cakes l10n shell. On Apr 18, 9:38 pm, "O.J. Tibi" wrote: > Localization strings in PO files should not be treated on a word-for- > word basis. It is much more con

Re: Proper way to handle empty localization strings?

2010-04-18 Thread O.J. Tibi
Localization strings in PO files should not be treated on a word-for- word basis. It is much more convenient to enter phrases (at the least) or paragraphs (at the most) that you want to translate. It might also be helpful that you do a page-by-page audit of your web app, and from there coordinate

Re: Proper way to handle empty localization strings?

2010-04-18 Thread Dr. Loboto
If you really need empty strings, put whitespace there. On Apr 18, 4:59 pm, Vesa Jääskeläinen wrote: > Hi All, > > In some situations some localization entries in .po file can have > empty strings defined in some languages and in some other languages > there should be some

Re: Proper way to handle empty localization strings?

2010-04-18 Thread Miles J
If there is no msgstr, it outputs the msgid. 1 - Not a bug. 2 - Why do you need to get an empty string? On Apr 18, 2:59 am, Vesa Jääskeläinen wrote: > Hi All, > > In some situations some localization entries in .po file can have > empty strings defined in some languages and i

Proper way to handle empty localization strings?

2010-04-18 Thread Vesa Jääskeläinen
Hi All, In some situations some localization entries in .po file can have empty strings defined in some languages and in some other languages there should be some text. So in example in locale A's .po file there would be: msgid "Entry" msgstr "" And then in locale B&

Re: Localization for Model validation messages

2009-12-27 Thread euromark
e: > > > > I can't agree, as I prefer to have the model be concerned with model > > > things (data, retrieval, saving, validation, etc.), and the view > > > concerned with presenting the data and the related error messages, > > > including the localization!

Re: Localization for Model validation messages

2009-12-27 Thread Walther
t agree, as I prefer to have the model be concerned with model > > things (data, retrieval, saving, validation, etc.), and the view > > concerned with presenting the data and the related error messages, > > including the localization! > > > Usually I only have one form in whic

Re: Localization for Model validation messages

2009-12-26 Thread si-mon
error messages, > including the localization! > > Usually I only have one form in which data for a specific model is > entered, so the adding a new rule and forgetting to add the > localization in the form, does not become an issue! Also, a change is > always planned - what to add, w

Re: Localization for Model validation messages

2009-12-25 Thread John Andersen
I can't agree, as I prefer to have the model be concerned with model things (data, retrieval, saving, validation, etc.), and the view concerned with presenting the data and the related error messages, including the localization! Usually I only have one form in which data for a specific mod

Re: Localization for Model validation messages

2009-12-25 Thread euromark
x27;error' => array('users_email_rule' => __ > ('users_email_rule',true) ) >    ) > ) ; > > Observe the 'error' option! Here I use it to convert the validation > message into the language that the user is viewing the form. > > Enjoy, >    John >

Re: Localization for Model validation messages

2009-12-25 Thread John Andersen
'error' => array('users_email_rule' => __ ('users_email_rule',true) ) ) ) ; Observe the 'error' option! Here I use it to convert the validation message into the language that the user is viewing the form. Enjoy, John On Dec 24, 7:39 pm, si-mon wrote: > Hi All, &g

Re: Localization for Model validation messages

2009-12-24 Thread euromark
$this->validationErrors[$field] = __($value, true); } } i even added an array functionality to use message = array('at least % chars', 255) etc On 24 Dez., 18:39, si-mon wrote: > Hi All, > > Is there a way to use localization for validation messages in t

Localization for Model validation messages

2009-12-24 Thread si-mon
Hi All, Is there a way to use localization for validation messages in the Model $validate array? eg: $validate = array ( 'name' => array('rule'=>'notEmpty', 'message'=>'Name is mandatory' )); I need the message 'Name is mandato

Re: Localization, using multiple pot files

2009-09-23 Thread Crazy
> > On Sep 22, 8:00 am, Crazy wrote: > > > Is it possible to use multiple po files? > > > I have not started with localization yet, so I was wondering if it was > > possible. > > > What we need is a general translation file, then one that contains all > >

Re: Localization, using multiple pot files

2009-09-22 Thread Miles J
Of course you can! __('textString'); // Uses default.po __d('errors', 'textString'); // Uses errors.po __d('help', 'textString'); // Uses help.po On Sep 22, 8:00 am, Crazy wrote: > Is it possible to use multiple po files? > > I have

Localization, using multiple pot files

2009-09-22 Thread Crazy
Is it possible to use multiple po files? I have not started with localization yet, so I was wondering if it was possible. What we need is a general translation file, then one that contains all the errors and another one that contains all the help text. So my question is can I switch files

Re: Error on syntax of localization file default.po

2009-09-04 Thread byqsri
;,$messageError) because prior I don't know which is the error and which is the field with error . So for use variables inside localization I must change heavily the behaviour and the view? Is there a different solution to do this without to change anything? Thanks On 3 Set, 18:26, Miles

Re: Error on syntax of localization file default.po

2009-09-03 Thread Miles J
Because your doing it wrong. Should be done like so: English version: en/errors.po msgid "fileExtRestricted" msgstr "The submitted file extension is not permitted, only %s permitted." Foreign versions: sp/errors.po msgid "fileExtRestricted" msgstr "L'estensione del file caricato non è permessa

Re: Error on syntax of localization file default.po

2009-09-03 Thread Christian
On 3 Sep., 18:00, "marco.rizze...@gmail.com" wrote: > Hi > I try to use the localization of Cake. > I have se in my errors.po: > > msgid "The submitted file extension is not permitted, only %s > permitted." > msgstr "L'estensione del fi

Error on syntax of localization file default.po

2009-09-03 Thread marco.rizze...@gmail.com
Hi I try to use the localization of Cake. I have se in my errors.po: msgid "The submitted file extension is not permitted, only %s permitted." msgstr "L'estensione del file caricato non è permessa, solo %s sono permesse." But in my code when I have this __d(

localization

2009-08-17 Thread rez...@gmail.com
Hi, I hope find help here . I just need a tutorial to make my cakePHP application multilingual I read this http://book.cakephp.org/view/162/Internationalizing-Your-Application but it do nothing and I don't know where's the Error I need a simple tutorial to do that plz --~--~-~--~~--

Re: i am facing problem in Localization in CakePHP

2009-08-06 Thread lapinski
What exactly isn't working for you? anurag-16 wrote: > > > In recent Cakephp version (1.2x) i am try to implement multilanguage > app on cakephp by using guidelines of Cookbook online manual. > > http://book.cakephp.org/view/163/Localization-in-CakePHP &

Re: Localization in CakePHP

2009-08-06 Thread Miles J
1) Upgraded to 1.2 if you haven't already and do not use the function uses(), use App::import(). 2) All localization should be done in a beforeFilter() or the bootstrap, not the action itself. 3) Should be this: msgid "registrationForm" msgstr &qu

i am facing problem in Localization in CakePHP

2009-08-06 Thread anurag
In recent Cakephp version (1.2x) i am try to implement multilanguage app on cakephp by using guidelines of Cookbook online manual. http://book.cakephp.org/view/163/Localization-in-CakePHP But its not working... Please help me out

Localization in CakePHP

2009-08-06 Thread anurag
I need help on this topic.i have follow up The Cookbook manual help regarding this.But there is no output. ### registartion.ctp Here i want localization create( 'Users', array('action' => 'add_user','name&#

Re: localization in cakephp

2009-07-05 Thread Alastair
On Jul 5, 6:16 pm, puneetratan wrote: > Can anyone tell me how can be implement localization in cakephp, > plz give me the code if possiable. Hi Puneet, Check out the CakePHP book entry about localisation at http://book.cakephp.org/view/161/Internationalization-Locali

localization in cakephp

2009-07-05 Thread puneetratan
Can anyone tell me how can be implement localization in cakephp, plz give me the code if possiable. Thanks Puneet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, sen

Re: Modifying Html Helper Image method for localization support

2009-07-03 Thread daedalus
ghout our QA process. On Jun 15, 1:04 pm, John Andersen wrote: > Just thought of this, may not be a good idea, but worth a try! > > Use the standard localization function __() as in the example below: > > $html->image( __('btn_action.gif',true) ); > >

Re: Localization - values in translated strings - my solution

2009-06-24 Thread lapinski
27;i18n'); > } > > if ($return === false) { > if (count($values)>0) echo > vsprintf(I18n::translate($singular), > $values); > else echo I18n::translate($singular); > } else { >

Localization - values in translated strings - my solution

2009-06-24 Thread イタリア人
I thought that this could interest someone else. If you want to be able to translate strings which contains dynamic data such: "Hello, my name is Julien" where "Julien" is a name, you could do this: sprintf(__("Hello, my name is %s",true),"Julien"); and your translation string would be "Hello,

Re: Modifying Html Helper Image method for localization support

2009-06-15 Thread John Andersen
Just thought of this, may not be a good idea, but worth a try! Use the standard localization function __() as in the example below: $html->image( __('btn_action.gif',true) ); and voila, you can decide to change the default image "btn_action.gif" into something else de

Re: Modifying Html Helper Image method for localization support

2009-06-14 Thread Adam Royle
Sent: Monday, June 15, 2009 6:24 AM Subject: Modifying Html Helper Image method for localization support > > Hello, > > I'm fairly new to CakePHP and have a question about the best way to > accomplish a task. Here is my situation: I'm building a little > localized app

Modifying Html Helper Image method for localization support

2009-06-14 Thread daedalus
Hello, I'm fairly new to CakePHP and have a question about the best way to accomplish a task. Here is my situation: I'm building a little localized app that incorporates a dozen or so images that will need to be localized - for example navigation buttons. The most logical way to organize these i

Re: Localization with multiple file

2009-03-14 Thread Miles J
You would set it up like this. Anything in default.po would use __(), if you have another po you would use __d(). default.po errors.po users.po __('login'); __d('errors', 'emptyUsername'); __d('users', 'username'); --~--~-~--~~~---~--~~ You received this message b

Localization with multiple file

2009-03-14 Thread marco.rizze...@gmail.com
Hi Perhaps thi is a banal question I would have more than one for the localization (one for validation message,one for name of fields etc...). I try to use in locale multiple files over default.po but I get no good results. How I can do this? Must I configure cake in some way? Thanks

bake script localization

2009-03-02 Thread rrd...@gmail.com
I am using localized controller method names. It would be nice if the core backe script could be localized. By this we could get localized baked controller method names, view files and links in view files. --~--~-~--~~~---~--~~ You received this message because you

Re: Question on localization

2008-12-06 Thread majna
> I have a question on localization of my application. > My application has many service builded on the same CakePHP. > Every service is avaible for some language. > Now I would have  a single file language for every service and not a > unique file default.po where there is every thing. &

Question on localization

2008-12-05 Thread [EMAIL PROTECTED]
Hi I have a question on localization of my application. My application has many service builded on the same CakePHP. Every service is avaible for some language. Now I would have a single file language for every service and not a unique file default.po where there is every thing. How can I set

localization

2008-10-15 Thread Liebermann, Anja Carolin
: 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.cakeph

AW: localization

2008-10-14 Thread Liebermann, Anja Carolin
-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 artic

Re: Variables in localization strings

2008-09-24 Thread lemp
Thanks Fran, it do work nicely. One small point I just bump on: if you use numbered arguments, be sure to quote your string in single quotes to prevent PHP from escaping it (i.e. trying to replace the varaible $s to its value), as in: sprintf(__('Results for Q%1$s %2$s', true), $quarter, $year)

Re: Variables in localization strings

2008-09-24 Thread Fran Iglesias
Hi, El 24/09/2008, a las 17:38, lemp escribió: > French: __("objectif", true) . " " . $year; > > English: $year . " " . __("objectif", true); The __() function supports the sprintf format, so > French: sprintf(__("objectif %s", true)); > > English: sprintf(__("%s objectif", true)); -- Fr

Variables in localization strings

2008-09-24 Thread lemp
When localizing an application, is there a way to deal with variables that require a certain order in the locale without creating a conditional statement? For example: French: __("objectif", true) . " " . $year; English: $year . " " . __("objectif", true); --~--~-~--~~~-

Re: localization

2008-09-17 Thread Claudia
s 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

localization

2008-09-16 Thread cem
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 secon

Re: Use localization in model validation

2008-07-11 Thread Alessandro Daducci
Sorry, you're right! I confused my code while I rewrite it to adapt to Emilio's case. I just used the trick you cited in yout post (about __contruct(...) method). It was a very nice solution! But I still understand one point: you told that in Changeset 5818 that problem was fixed. But I still hav

Re: Use localization in model validation

2008-07-11 Thread Alessandro Daducci
Sorry, You're right! I confused my code with the one that was in your old post you cited about __contruct(...). I used that trick, it was great! But I don't understand: you told that in Changeset 5815 that problem was fixed, but I still have it in my 1.2 RC2 version. What's wrong? Sorry for my s

Re: Use localization in model validation

2008-07-10 Thread francky06l
@Allessandro, that would not work, you can't initialize model variable with a function call. @Emilio, I did post a ticket on this a while ago with a solution (as you described), it has been introduced and removed after (probably because it does not cover all needs etc..). I end up writing the inv

Re: Use localization in model validation

2008-07-10 Thread Alessandro Daducci
Hi Emilio! > I'll ilustrate the problem with an example, I want to make something > like this: > > > var $validate = array > ( > "status" => array > ( > "rule" => "numeric", > "rule" => array ("range", -1, 101)

Use localization in model validation

2008-07-10 Thread Emilio González Montaña
Hello, I'm newie, I've a problem (and a solution) for use localization in variable $validate in models. I'll ilustrate the problem with an example, I want to make something like this: var $validate = array ( &q

Re: Localization and Internationalization: Can't switch languages

2008-06-20 Thread deltawing
Sorry, but it wasn't deliberate :) For some reason this post appeared like an hour after it was posted, making me think it failed to send. Could be caching I don't know. For people facing the same problem, refer to this link on internationalization: http://groups.google.com/group/cake-php/browse_

Re: Localization and Internationalization: Can't switch languages

2008-06-20 Thread Chris Hartjes
On Fri, Jun 20, 2008 at 1:21 PM, deltawing <[EMAIL PROTECTED]> wrote: > > I followed the CakePHP 1.2 tutorial and was able to set the language > in beforeFilter(). > > The problem is I want users to be able to switch the language at any > time, by clicking on a link. How can I do that? I've tried

Localization and Internationalization: Can't switch languages

2008-06-20 Thread deltawing
I followed the CakePHP 1.2 tutorial and was able to set the language in beforeFilter(). The problem is I want users to be able to switch the language at any time, by clicking on a link. How can I do that? I've tried many things but I still can't get it to work. Any takers? Thanks in advance. -

Re: Localization in models

2008-04-26 Thread Mantas
I've found answer: http://groups.google.com/group/cake-php/browse_thread/thread/4c9aefe0f8c8ead3/971f3d3faeada0a8?lnk=gst&q=Internationalization#971f3d3faeada0a8 On Sat, Apr 26, 2008 at 4:01 PM, Mantas K. <[EMAIL PROTECTED]> wrote: > So how can i do it? In fact, i need

Localization in models

2008-04-26 Thread Mantas K.
So how can i do it? In fact, i need localization with validation. I want to use: 'email' =>array( 'rule' => 'email', 'message' => __('It is not valid em

Re: Some doubts with Dynamic Content Localization

2008-03-06 Thread Fran Iglesias
El 06/03/2008, a las 9:57, ninjapiza escribió: > What's your question about your doubt is with associated models ? I don't know if the translate behavior is able to retrieve translations for the associated models. And if so, how? >> Another bit confusing me after reading some tutorials is ho

Re: Some doubts with Dynamic Content Localization

2008-03-06 Thread ninjapiza
Hi, What's your question about your doubt is with associated models ? On 26 fév, 13:34, Fran Iglesias <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to implement dynamic content localization in one project > usingtranslatebehavior and the i18n table. > >

1.2 Localization Question

2007-09-17 Thread savagekabbage
Hey Guys, I was wondering if 1.2 supported .PO files on a per/plugin basis. I have an app I'm going to be distributing with many plugins, and it would be nice if I could separate language files just among the plugins that need them. Ideally I would like to be able to place the .PO files in the

Re: 1.2 Localization Question

2007-09-17 Thread savagekabbage
After some searching I found an enhancement ticket here: https://trac.cakephp.org/ticket/1855 Anyone know how to achieve this in the meantime? On Sep 17, 4:34 pm, savagekabbage <[EMAIL PROTECTED]> wrote: > Hey Guys, > > I was wondering if 1.2 supported .PO files on a per/plugin basis. I > hav

Re: cake i18n localization

2007-05-17 Thread Chris Hartjes
On 5/17/07, ks <[EMAIL PROTECTED]> wrote: > > the __( ...) method seems to call the debug_backtrace() method to get > the directory by getting the stacktrace > > Looking at the data returned and the call, it looks expensive to do > this for every string I call to translate. > Why don't you benchm

cake i18n localization

2007-05-17 Thread ks
the __( ...) method seems to call the debug_backtrace() method to get the directory by getting the stacktrace Looking at the data returned and the call, it looks expensive to do this for every string I call to translate. Is there a way to do it differently or override this? Thanks, Krishnan -

I18n and Localization support

2007-03-27 Thread ks
We are building a site that needs to support multiple languages - content ( titles of topics etc), user names and DB strings etc. will be in multiple languages - including chinese. >From the information I found on the site, the 1.1 version will not support this right? Will the alpha version (1.2

  1   2   >