Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
fd06488f
Unverified
Kaydet (Commit)
fd06488f
authored
Haz 28, 2018
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Haz 28, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed links for i18n context processor docs.
üst
99157064
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
api.txt
docs/ref/templates/api.txt
+8
-2
translation.txt
docs/topics/i18n/translation.txt
+8
-3
No files found.
docs/ref/templates/api.txt
Dosyayı görüntüle @
fd06488f
...
...
@@ -690,14 +690,20 @@ the request's IP address (``request.META['REMOTE_ADDR']``) is in the
``django.template.context_processors.i18n``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If this processor is enabled, every ``RequestContext`` will contain these two
.. function:: i18n
If this processor is enabled, every ``RequestContext`` will contain these
variables:
* ``LANGUAGES`` -- The value of the :setting:`LANGUAGES` setting.
* ``LANGUAGE_BIDI`` -- ``True`` if the current language is a right-to-left
language, e.g. Hebrew, Arabic. ``False`` if it's a left-to-right language,
e.g. English, French, German.
* ``LANGUAGE_CODE`` -- ``request.LANGUAGE_CODE``, if it exists. Otherwise,
the value of the :setting:`LANGUAGE_CODE` setting.
See :doc:`/topics/i18n/index` for more.
See :ref:`i18n template tags <i18n-template-tags>` for template tags that
generate the same values.
``django.template.context_processors.media``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
docs/topics/i18n/translation.txt
Dosyayı görüntüle @
fd06488f
...
...
@@ -845,7 +845,7 @@ If you want to select a language within a template, you can use the
While the first occurrence of "Welcome to our page" uses the current language,
the second will always be in English.
.. _
template-translation-var
s:
.. _
i18n-template-tag
s:
Other tags
----------
...
...
@@ -880,8 +880,13 @@ locale's direction. If ``True``, it's a right-to-left language, e.g. Hebrew,
Arabic. If ``False`` it's a left-to-right language, e.g. English, French,
German, etc.
If you enable the ``django.template.context_processors.i18n`` context processor
then each ``RequestContext`` will have access to ``LANGUAGES``,
.. _template-translation-vars:
``i18n`` context processor
~~~~~~~~~~~~~~~~~~~~~~~~~~
If you enable the :class:`django.template.context_processors.i18n` context
processor, then each ``RequestContext`` will have access to ``LANGUAGES``,
``LANGUAGE_CODE``, and ``LANGUAGE_BIDI`` as defined above.
.. templatetag:: get_language_info
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment