Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Internet > HTTP (WWW)

    django-i18nurls 0.7

    Download button

    No screenshots available
    Downloads: 134  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Orne Brocaar | More programs
    BSD License / FREE
    February 13th, 2012, 21:43 GMT [view history]
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-i18nurls description

    Translate URL patterns and prefix URLs with language-code

    django-i18nurls is a Django pluggable app that makes it possible to translate URL patterns by using gettext. As well it contains a custom patterns function for prefixing URLs with the active language-code (eg: /en/news/, /nl/nieuws/) and a middleware to activate the language code in the prefix (for incoming request).

    Examples:

    # urls.py
    from django.conf.urls.defaults import patterns, include, url
    from django.utils.translation import ugettext_lazy as _

    from i18nurls.defaults import locale_prefixed_patterns


    patterns = locale_prefixed_patterns('',
     url(_(r'^users/register/$', 'your.view', name='account-register')),
    )

    # In your shell, after updating your translations (with makemessages / compilemessages)
    >>> activate('nl')
    >>> reverse('account-register')
    '/nl/gebruikers/registeren/'

    >>> activate('en')
    >>> reverse('account-register')
    '/en/users/register/'


    Installation

    - Add i18nurls to your settings.INSTALLED_APPS
    - Add i18nurls.middleware.LocaleMiddleware to your settings.MIDDLEWARE_CLASSES. Note: This middleware replaces the default Django LocaleMiddleware.


    Product's homepage

    Requirements:

    · Python
    · Django

    What's New in This Release: [ read full changelog ]

    · {% language %} template-tag implemented (thanks to Harro van der Klauw).
    · LocaleMiddleware class is not patched anymore (Issue #3).
    · i18n_patterns is not patched anymore.
    · Trailing slash is now optional in LocaleMiddleware regex.

      


    TAGS:

    URL patterns | translate patterns | Django | URL | patterns



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM