localization with haXigniter

1 view
Skip to first unread message

Franco Ponticelli

unread,
Oct 16, 2009, 7:09:53 AM10/16/09
to haXigniter
Which is the correct way to deal with localization in haXigniter? The
question is not limited to contents but to URIs too and I am sure
there is more than one correct answer.
For i18n of URIs I mean something like:

english url
/product/1

italian url
/prodotto/1

The controller logic should be the same (using Product.show()) but
somewhere and somehow the extra language parameter should be known by
the system.

Andreas Söderlund

unread,
Oct 16, 2009, 7:28:55 AM10/16/09
to haxig...@googlegroups.com
On Fri, Oct 16, 2009 at 1:09 PM, Franco Ponticelli <franco.p...@gmail.com> wrote:

Which is the correct way to deal with localization in haXigniter? The
question is not limited to contents but to URIs too and I am sure
there is more than one correct answer.
For i18n of URIs I mean something like:

english url
/product/1

italian url
/prodotto/1

Hi, I see what you mean. There is no routing system in haXigniter right now, but I guess it must be introduced soon to handle things like this! If we can make it handle multi-languages quite transparent, it would be great. Any ideas are very appreciated.


/Andreas

Franco Ponticelli

unread,
Oct 16, 2009, 7:32:20 AM10/16/09
to haxig...@googlegroups.com
I've just looked at the documentation (very well done) and not yet tried to code anything, but hopefully I will have to start a project in the next few weeks that seems to fit perfectly here. Since that kind of localization will be required I will discuss it with you here before starting anything. At the moment I am still too ignorant on the lib architecture to make any guess.

Franco.

Andreas Söderlund

unread,
Oct 16, 2009, 9:45:38 AM10/16/09
to haxig...@googlegroups.com
On Fri, Oct 16, 2009 at 1:32 PM, Franco Ponticelli <franco.p...@gmail.com> wrote:
I've just looked at the documentation (very well done) and not yet tried to code anything, but hopefully I will have to start a project in the next few weeks that seems to fit perfectly here. Since that kind of localization will be required I will discuss it with you here before starting anything. At the moment I am still too ignorant on the lib architecture to make any guess.

Sounds interesting! The request is handled with the simple library src/haxigniter/libraries/Request.hx. The fromArray() method takes the first segment of the url and creates a controller with that name. Here we should attach some language-aware routing system.

/Andreas

Franco Ponticelli

unread,
Oct 16, 2009, 10:31:57 AM10/16/09
to haxig...@googlegroups.com

Ok, thank you for the info ... they will be useful for sure
Reply all
Reply to author
Forward
0 new messages