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 6895703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:56:32+00:00 2026-05-27T06:56:32+00:00

I have template with the following: {% load i18n %} {% trans Welcome to

  • 0

I have template with the following:

{% load i18n %}
  {% trans "Welcome to my site!" %}

I use RequestContext, have called makemessages, edited .po files and compiled messages, but everything is not translated, I just see the same message even when I load the page.

Extract from .po file

msgid "Welcome to my site!"

msgstr "blahblah"
  • 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-05-27T06:56:33+00:00Added an answer on May 27, 2026 at 6:56 am

    To get translations to show in templates:

    Your settings.py should have the following:

    USE_I18N = True
    USE_L10N = True # optional, but recommended
    LANGUAGE_CODE = 'en-us' # Or whatever language you want as default
    

    You should have 'django.core.context_processors.i18n' in your TEMPLATE_CONTEXT_PROCESSORS

    You should add 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE_CLASSES (after 'django.contrib.sessions.middleware.SessionMiddleware')

    Make sure your templates have {% load i18n %} somewhere near the top.

    Once you have translated and compiled the messages, to actually get the translation to show, you need to tell django which language you need. To do that, do one of the following:

    1. Set django_language key in the session which the language code you want.
    2. Set a cookie called django_language to the language you want.

    If after all the above, you are not getting any translations to show – then django is not able to find your message files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Javascript between tags in a template: YAHOO.util.Event.addListener(window, load, function() {
I have the following code that selects all the different template files out of
I am migrating application from JSF1.2/MyFaces+Facelets TO JSF2.1/MyFaces. I have following template which used
I have the following template declaration: template <typename T> void IterTable(int& rIdx, std::vector<double>& rVarVector,
I have the following template method declared in my interface: class IObjectFactory { public:
I have the following template in Backbone, all gets rendered perfectly. <a href=#list data-role=button
I have used the following template in my project: <DataTemplate x:Key=textBoxDataTemplate> <TextBox Name=textBox ToolTip={Binding
I have a view that renders a list elements using the following template :
I have defined following control template for my custom control. <ControlTemplate TargetType={x:Type local:CustomControl}> <Grid
I have the following scenario :- template <typename T> class Base { public: virtual

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.