Wednesday, October 27, 2010

Re: get available locales as list for <select> combobox

Hello, I am not aware of a helper/component that does this.
You can create you a list of the files in app / locale via PHP using
the glob() function, but you can not translate it because it is not a
fixed string (and especially the glob occurs in runtime) And "bake
i18n extract" can not generate the. pot.
I solved creandomi a tool bash or php to run in order to build the
pot, and I think they integrate it into bake i18n can be very helpful.


On 27 Ott, 10:50, cwsTrummer <christian.trum...@gmail.com> wrote:
> i am trying to make my application multilanguage ready so i have
> created two folders in my app/locale folder name "eng" and "deu" and
> made a default.po file. everything is working fine and gets
> translated!
>
> but now i want to save the language to each user which can login. so i
> have a field "language" in my databasetable where i want to store
> "eng" or "deu"
>
> is it possible to generate a list for my view form because of the
> folders which exist in the app/locale folder?
> its easy to code this by myself.. getting a list of folders by php and
> translate them to the real language names but is there an existing
> solution? for example a component or helper which does this already??
> should be cake core functionality!!

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: