Author: batiste.bieler
Date: Tue Apr 7 02:49:48 2009
New Revision: 442
Modified:
wiki/InstallDjangoPageCMS.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/InstallDjangoPageCMS.wiki
==============================================================================
--- wiki/InstallDjangoPageCMS.wiki (original)
+++ wiki/InstallDjangoPageCMS.wiki Tue Apr 7 02:49:48 2009
@@ -91,11 +91,15 @@
* http://docs.djangoproject.com/en/dev/ref/settings/#languages
* http://docs.djangoproject.com/en/dev/ref/settings/#language-code
-This CMS use the PAGE_LANGUAGES setting. By default PAGE_LANGUAGES value
is set to settings.LANGUAGES, but you certainly want to set this setting
yourself to include only the languages you want to support.
+This CMS use the PAGE_LANGUAGES setting in order to present which language
are supported by the CMS.
-Django use settings.LANGUAGES constant for setting the
request.LANGUAGE_CODE that is used by this CMS. So if the language you want
to support is not present in settings.LANGUAGES, request.LANGUAGE_CODE will
not be set correctly with your language.
+By default PAGE_LANGUAGES value is set to LANGUAGES settings so you can
directly set the LANGUAGES setting if you want.
-A possible workaround is to redefine settings.LANGUAGES. For example you
could do :
+You *should set* PAGE_LANGUAGES yourself because by default the LANGUAGES
list is big.
+
+Django use LANGUAGES setting to set the request.LANGUAGE_CODE that is used
by this CMS. So if the language you want to support is not present in the
LANGUAGES setting, request.LANGUAGE_CODE will not be set correctly.
+
+A possible solution is to redefine settings.LANGUAGES. For example you can
do :
{{{
# here is all the languages you want to be supported by the CMS
@@ -109,7 +113,7 @@
languages = list(PAGE_LANGUAGES)
languages.append(('fr-fr', gettext_noop('French')))
languages.append(('fr-be', gettext_noop('Belgium french')))
-# redefine the settings.LANGUAGE constant
+# redefine the LANGUAGES setting in order to set request.LANGUAGE_CODE
correctly
LANGUAGES = languages
# This enable you to map a language(s) to another one, these languages
should
@@ -153,18 +157,11 @@
)
}}}
-===Default language and template===
+===Default templates===
-You *must* set DEFAULT_PAGE_TEMPLATE to the name of your default CMS
template. And LANGUAGES with wanted languages.
+You *must* set DEFAULT_PAGE_TEMPLATE to the name of your default CMS
template.
{{{
-gettext_noop = lambda s: s
-LANGUAGES = (
- ('fr', gettext_noop('French')),
- ('de', gettext_noop('German')),
- ('en', gettext_noop('English')),
-)
-
DEFAULT_PAGE_TEMPLATE = 'pages/index.html'
}}}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" 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/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---