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 advantage for this is that you don't need to create another PO
file in the base language that you're working on, and all you need to
do is generate files for the other languages that your application
will be supporting.

If you're trying to say that, for example, one word for the English
language can be used in different context to cater to an implicit
meaning BUT you might need to use other words in another language to
convey meaning in another context, then you might be off better to
create language-neutral message ids. The minor downside for this is
you also have to generate the PO file in your base language.

As you have suggested, you may have to add another level of grouping
for your message ids, like "MessageGroup.SubkeyOrWord.Variation1",
"MessageGroup.SubkeyOrWord.Variation2" and so on.

Let's say we have the following:

====

Submit, variation 1

(en)
msgid "MyApplication.Submit.1"
msgstr "SUBMIT"

(sv)
msgid "MyApplication.Submit1"
msgstr "GODKÄNN"

====

But then you could be using SUBMIT in another Swedish context:

====

Submit, variation 1

(en)
msgid "MyApplication.Submit.2"
msgstr "SUBMIT"

(sv)
msgid "MyApplication.Submit2"
msgstr "SKAPA"

====

Notice how the translations are keyed like "MyApplication.Submit.1"
and  "MyApplication.Submit.2". That's a viable workaround IMHO.

Hope this helps, cheers!

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to