Wednesday, November 25, 2009

Re: About multilingual websites

Thanks,

For 1:
I tried what you said and I get exactly the same, i.e. :

Welcome to CakePHP v1.2.4.8284 Console
---------------------------------------------------------------
App : app
Path: /Users/thomas/Sites/MyApp/app
---------------------------------------------------------------
What is the full path you would like to extract?
Example: /Users/thomas/Sites/MyApp/myapp
[Q]uit
[/Users/thomas/Sites/MyApp/app] >

Any clue?

For 2:
Thanks, now the plural form is definitely very clear. But still:
1) does a full and updated blog to do multilingual apps with Cake
exist in some place?
2) is there another way to do so than the console one? I read that
creating the .po files manually is a bit dangerous due to encoding, am
I wrong?

Thanks,

On Nov 24, 3:41 pm, Martin Westin <martin.westin...@gmail.com> wrote:
> Hi,
>
> For 1:
> If Cake has trouble figuring out where your app is (for some reason).
> The simple workaround is to specify it with the full path:
>
> /Users/thomaus/Sites/MyApp/cake/consol/cake -app /Users/thomaus/Sites/
> MyApp/app i18n extract
>
> That is the foolproof and disgustingly verbose way of making sure you
> target the right app (= how to call the console from cron).
>
> For part of 2:
> Plural forms are explained sort-of correctly in that post. The problem
> is that they depend greatly on the language you translate into. First
> is the header in the .po file which specifies how this language treats
> plurals. Second is the actual messages that will then need to add
> plural forms to match the header. But not all messages need plural
> forms!! Only single words that are translated in a plural-senitive way
> need them.
>
> Normal singular translation will likely be 99% of what you do:
> msgid "this is just a string, no plurals needed!"
> msgstr "det här är bara en sträng, inga plurala variationer behövs!"
>
> Then there will be things like date and time formatters, translated
> paging labels and things of that sort:
> msgid "second"
> msgid_plural "seconds"
> msgstr[0] "sekund"
> msgstr[1] "sekunder"
>
> My advice is to stay away from too many single words and plurals in
> your translations. My reason for this is that synonyms rarely match
> that well and generally the quality of the translated copy will
> suffer. It is a lot simpler for a translator to read entire sentences
> and to re-work them for the new language. Remember that you can put
> variables into the translation strings and that if you have more than
> one you should make sure their order is changeable.
>
> /Martin
>
> On Nov 24, 2:48 pm, thomaus <tho...@saimiris.com> wrote:
>
> > Hi,
>
> > Thanks for your answer.
>
> > 1) I tried to do "../cake/consol/cake i18n extract" from my /MyApp/
> > app/ path and it says:
>
> > Welcome to CakePHP v1.2.4.8284 Console
> > ---------------------------------------------------------------
> > App : app
> > Path: /Users/thomas/Sites/MyApp/app
> > ---------------------------------------------------------------
> > What is the full path you would like to extract?
> > Example: /Users/thomaus/Sites/MyApp/myapp
> > [Q]uit
> > [/Users/thomaus/Sites/MyApp/app] >
>
> > I don't get why it does so.
>
> > 2) Is there a clear and updated tutorial or blog to do multilingual
> > applications with CakePHP?
> > I found this onehttp://bakery.cakephp.org/articles/view/p28n-the-top-to-bottom-persis...
> > but it's completely out-of-date...
>
> > About the plural form, is this blog correct?http://nik.chankov.net/2008/11/20/translating-plural-and-singular-for...
>
> > Thanks in advance,
>
> > On Nov 23, 4:55 pm, "Larry E. Masters aka PhpNut" <php...@gmail.com>
> > wrote:
>
> > > Ignore this section in the manual it in incorrect:
>
> > > "Remember that po files are useful for short messages, if you find you want
> > > to translate long paragraphs, or even whole pages - you should consider
> > > implementing a different solution. e.g.:"
>
> > >http://cakedc.com/usesentireparagraphs.
>
> > >http://cakeqs.org/isanotherexample, the cakeqs.pot for it is located
> > > here:http://groups.google.com/group/cake-php/filesyoucanopen that file
> > > in an editor and around line 1735 see a msgid for an entire paragraph. the
> > > cakeqs-*.po files are the actual files we use in the app.
>
> > > One of the most important settings in the .po file is Plural-Forms:, if it
> > > is incorrect, your plural translations will not look right. Let me know if
> > > you need help with this, I am working to get the old
> > > translations.cakephp.org domain setup again and it will list all the
> > > different plural form expressions:
>
> > > Example (There are 16 forms of plurals, 2 listed below):
>
> > > #English, French, etc
> > > nplurals=2; plural=n>1;
>
> > > #Japanese etc
> > > nplurals=1; plural=0;
>
> > > You can also dig through the test case app in the core that has all the
> > > plural forms in cake/tests/test_app/local/*
>
> > > Another piece of advice you may already know.
>
> > > Using the console you can extract these string with the following command.
>
> > > cake i18n extract
>
> > > This will create the pot file that you would use to create the .po files
> > > using a tool likewww.poedit.net
>
> > > /**
> > > * @author Larry E. Masters
> > > * @var string $userName
> > > * @param string $realName
> > > * @returns string aka PhpNut
> > > * @access  public
> > > */
>
> > > On Mon, Nov 23, 2009 at 5:35 AM, thomaus <thomas.ausse...@gmail.com> wrote:
> > > > Hi there,
>
> > > > One month ago, I did a multilanguage website using CakePHP but putting
> > > > all the multilangual content in my dB.
>
> > > > From what I read today, this was the right way to display short
> > > > messages in various languages with CakePHP :
> > > >http://book.cakephp.org/view/162/Internationalizing-Your-Application
>
> > > > From what I read too, "po files are useful for short messages, if you
> > > > find you want to translate long paragraphs, or even whole pages - you
> > > > should consider implementing a different solution".
>
> > > > Then my question is : is there a standard way to translate dynamically
> > > > long paragraphs?
>
> > > > Thanks,
>
> > > > --
>
> > > > 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<cake-php%2Bunsubscr...@googlegroups.c om>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate