Open coto opened 12 years ago
this page shows how it is intended to be used: http://babel.edgewall.org/wiki/Documentation/0.9/display.html We need the locale object set in the basehandler which determines which language we are using the render the site and then you can call the territories dict from that. The hard part is getting the locale object set in the basehandler.
good point, i'll check it out
On Mon, Oct 8, 2012 at 5:07 PM, Jesse Goodall notifications@github.comwrote:
this page shows how it is intended to be used: http://babel.edgewall.org/wiki/Documentation/0.9/display.html We need the locale object set in the basehandler which determines which language we are using the render the site and then you can call the territories dict from that. The hard part is getting the locale object set in the basehandler.
— Reply to this email directly or view it on GitHubhttps://github.com/coto/gae-boilerplate/issues/162#issuecomment-9238418.
two more ideas:
I am using it on a project, but the reason it has country for registration (some time ago I read a research) is because after email, password, username, name and last name, the next most important field for international sites, is Country.
I'm using it on a project as well. Do you want to verify IP address -> country mapping or just take the persons word?
In order to show the countries in any language sopported, we have to use Babel to show the countries with:
from babel import Locale COUNTRIES = Locale('es').territories
here: https://github.com/coto/gae-boilerplate/blob/master/boilerplate/lib/utils.py#L207
We can't use it directly, because it throws the following error:
TypeError: 'NoneType' object is not callable