In Python you can use the dictionary (IT = italian):

>>> TRANS = {
...     "IT" : {
...     "hello" : "ciao",
...     "apple" : "mela",
...     }
... }
>>> TRANS
{'IT': {'hello': 'ciao', 'apple': 'mela'}}
.
.
.
-- Best Template Engine
http://pyoohtml.appspot.com/best-template-engine
.
.
.
On Sep 6, 1:25 pm, A.TNG <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 23, 2008 at 10:31 PM, Takashi Matsuo
>
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Perhaps you can use django's i18n capability. In my case, it worked 
> > perfectly.
>
> > Please see:
> >http://www.djangoproject.com/documentation/i18n/
> > or
> >http://www.djangoproject.com/documentation/0.96/i18n/
> > according to the django's version.
>
> > Happy coding :-)
>
> Hi,
>
> Following is my settings.py:
>
> # Django settings for the example project.
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
> ROOT_URLCONF = 'urls'
>
> import os
> ROOT_PATH = os.path.dirname(__file__)
> TEMPLATE_DIRS = (
>     # Put strings here, like "/home/html/django_templates" or
>     # "C:/www/django/templates".  Always use forward slashes, even on Windows.
>     # Don't forget to use absolute paths, not relative paths.
>     ROOT_PATH + '/templates',
> )
>
> MIDDLEWARE_CLASSES = (
>     #'django.middleware.locale.LocaleMiddleware',
>     'django.middleware.common.CommonMiddleware',
> )
>
> LANGUAGE_CODE = 'zh-cn'
>
> INSTALLED_APPS = (
>     #'django_hello.hello',
>     #'django_hello.newtest'
> )
>
> But, Django's i18n module only search .mo under
> "google_appengine\lib\django\django\conf\locale". I have created
> folder 'locale' under myapp. But it take no effect.
>
> Could I need one more parameter "LOCALE_PATHS" in settings.py? How to
> set the value of "LOCALE_PATHS"?
>
> Could you offer a example? Thanks.
>
>
>
>
>
> > -- Takashi
>
> > On Mon, Jun 23, 2008 at 11:20 PM, limodou <[EMAIL PROTECTED]> wrote:
> >> On Mon, Jun 23, 2008 at 10:11 PM, slizardo <[EMAIL PROTECTED]>
> >> wrote:
>
> >>> The sure-shoot approach might be trough the use of template values
> >>> with all the literals.
> >>> But I would like to have something similar to a properties file *
> >>> (like in Java or PHP), one for each locale.
> >>> Any ideas or sample implementations?
>
> >>> Thank you!
>
> >> I'm developing a new framework named uliweb, and it has already support 
> >> i18n
> >> now. maybe you can see it for some help. But I have no time to write
> >> document about i18n process yet, I'll write the document as soon as I can.
>
> >> --
> >> I like python!
> >> UliPad <<The Python Editor>>:http://code.google.com/p/ulipad/
> >> UliWeb <<simple web framework>>:http://uliwebproject.appspot.com
> >> My Blog: (new)http://http://hi.baidu.com/limodou
> >> (old)http://www.donews.net/limodou
>
> --
> Best Regards,
> TANG Jiyu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to