Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8673515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:28:41+00:00 2026-06-12T19:28:41+00:00

I am using multiple translation in my project For that I have updated my

  • 0

I am using multiple translation in my project

For that I have updated my settings file as

    LANGUAGE_CODE = 'en-us'

    gettext = lambda s: s


    LANGUAGES = (

        ('es', gettext('Spanish')),
        ('en', gettext('English')),
    )


    LOCALE_PATHS = (
        '/mnt/aviesta/pythondev/django/locale',
    )

    USE_I18N = True
MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',


TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.core.context_processors.request",
)

And my template file as:

{% load i18n %}

{% trans "Hello" %}


<p>Already a user <a href="/login/"><b>{% trans "login here" %}</b></a></p>

after that I create a locale folder parallel to my app and than create the specific language folders in it as :django-admin.py makemessages -l es which creates the .po file and then update this .po file as:

#: customer_reg/customer_register.html:14
msgid "Hello"
msgstr "¡Hola"

#: customer_reg/customer_register.html:17
msgid "login here"
msgstr "ingresa aquí"

And finally i compiled my msg django-admin.py compilemessages

BUt my strings “hello” and “login here” is remain in English, they are not translated.I don’t know why it happens ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:28:43+00:00Added an answer on June 12, 2026 at 7:28 pm

    Everything looks great with your code. The only thing I’ve never seen is the LOCALE_PATHS in settings.py

    Mabye this answer, I did some time ago, could help you: Issues with multiple languages

    Edit // Answer to comment

    from django.utils import translation
    translation.activate('es')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using core data on an iPhone application. I have multiple persisntent stores that
I'm using multiple threads in my application. Basically I have a combo box and
I have a project that adds elements to an AutoCad drawing. I noticed that
I have multiple language packs in my NSIS installer, using the MUI2 interface. Now
I have done a few websites and applications with support for multiple languages where
I'm using a transaction to insert multiple rows in multiple tables. For these rows
I plan on using multiple popups on my website. Every popup will be rendered
I am using multiple instances of AVAudioPlayer to play multiple sound files in a
I am using multiple instances of AVAudioPlayer to play multiple audio files simultaneously. I
I am using multiple threads in my application using while(true) loop and now i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.