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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote:
>
> > > Nobody no clue?
>
> > > On Jan 20, 4:38 pm, thomaus <[email protected]> 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 [email protected]
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