Hi all,

I just have a very simple question. I am using ext-js within my
turbogears setup and their i18n idea is to include a bunch of
javascript files dynamically depending on the locale of the request.

Currently, I have the following code in my templates:

        <?python
        lang_url = '/javascript/ext2.2.1/resources/locale/ext-lang-' +
tg.locale[0] + '.js'
        ?>

to determine the javascript file which is obviously very naive. The
locale array just includes all the locale's supported by the browser,
not necessarily the one picked by turbogears. My specific question is
what function should I call from within the template to get the actual
locale of the request?

My generic question is: Is there a better way of doing this? In the
end, I want to have this javascript file included in my template:

/javascript/ext2.2.1/resources/locale/ext-lang-en.js if the language
is en, thats all.

Thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to