and just load ONE static text in French? the rest of the page remains
"English"?
=> no "language switch" used
then john's approach would actually fit
you need to be careful, though
once you allow changing to a secondary language all .po files used in
__d()
must be available there, too (linked or copied)
otherwise they wont be found in the secondary language...
On 23 Jan., 15:33, euromark <dereurom...@googlemail.com> wrote:
> i dont think the first param should be "french" or any language so to
> speak
>
> as pointed out in the cookbook it will look up all french language
> translations inside the locale folder for french anyway
> so all access to __d() would be in the currenctly active language
> (like __() as well)
>
> and inside it there should be one main po file for __() and different
> po files for custom "pages, modules, etc" - but all for the same
> language
>
> echo __d('static_stuff','Some Long Text',true);
> echo __d('static_stuff_2','Some Other Long Text',true);
>
> otherwise you could just stick to the default __()
>
> checkout miles' forum plugin
> he uses it the right way:http://github.com/milesj/forum/downloads
>
> On 23 Jan., 09:51, John Andersen <j.andersen...@gmail.com> wrote:
>
> > The __d() function is used to specify another domain .po file, thus
> > instead of using the default.po, you specify that it should use the
> > french.po :) Example:
>
> > [code]
> > echo __d('french','Bon Voyage',true);
> > [/code]
>
> > and CakePHP will look for 'Bon Voyage' in the "french.po" file!
>
> > See the CakePHP book at:http://book.cakephp.org/view/163/Localization-in-CakePHP
> > for an example of the __d() usage.
>
> > Enjoy,
> > John
>
> > On Jan 22, 11:32 pm, thomaus <tho...@saimiris.com> wrote:
>
> > > Hi John,
>
> > > I'm using .po files so I guess the solution you propose is a good one
> > > for me. But:
>
> > > - what is the _d() function? I'm using the __() function so far
>
> > > - how can switch from one language to another one with this function?
>
> > > Thanks for helping.
>
> > > On Jan 22, 2:58 pm, John Andersen <j.andersen...@gmail.com> wrote:
>
> > > > Hi Thomaus,
>
> > > > I have some questions! When you write that the content is french, do
> > > > you mean the data or the static text?
> > > > Are you using .po files or i18n in the database?
>
> > > > If I had to solve it only for the static text, then I would just use a
> > > > specific .po file for that and use the __d() function for reading from
> > > > the .po file.
>
> > > > Enjoy,
> > > > John
>
> > > > On Jan 22, 3:32 pm, thomaus <tho...@saimiris.com> wrote:
>
> > > > > Nobody no clue?
>
> > > > > On Jan 20, 4:38 pm, thomaus <tho...@saimiris.com> wrote:
>
> > > > > > Hi,
>
> > > > > > I made an multilingual app which works nice but now I would need to
> > > > > > change the language but only in a given <div> of my view. Is this
> > > > > > possible and how?
>
> > > > > > Means that my content page would be like that:
>
> > > > > > English Header
>
> > > > > > English Title
>
> > > > > > Some English Content
>
> > > > > > Some French Content
>
> > > > > > Some English Content again
>
> > > > > > English Footer
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment