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

The Archive Base Latest Questions

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

When using localized list of choices for a model field, the admin doesn’t show

  • 0

When using localized list of “choices” for a model field, the admin doesn’t show the translated values in the list view.

Short example:

from django.utils.translation import ugettext_lazy as _

class OrderStates:
    STATES = (
        (STATE_NEW, _("New")),
        (STATE_CANCELLED, _("Cancelled")), )

class Order(models.Model):
    state = models.IntegerField(choices=OrderStates.STATES)
    # ..

class OrderAdmin(admin.ModelAdmin):
    list_display = [ 'id', 'state', 'address', 'user']
    # ..

admin.site.register(Order, OrderAdmin)

The localized versions of “New” and “Cancelled” show up correctly in the front-end and in the admin form when editing an order. But in the admin list view I get blank fields – regardless of the language I switch to, including English. Column names are fine.

This only happens with Python 2.3 (talk about niche questions). The choices display correctly everywhere with Python 2.5. I don’t get any errors or warnings in neither.

Tried using ugettext instead of ugettext_lazy for the options, which didn’t work. ugettext_noop sort of works – it at least shows the original english versions instead of blank fields.

Am I doing something wrong or is this a bug?

  • 1 1 Answer
  • 1 View
  • 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-12T06:10:56+00:00Added an answer on May 12, 2026 at 6:10 am

    This is probably a bug somewhere in Django, not calling force_unicode on the item correctly. The original code you pasted is correct. You don’t mention what Django version you’re using, so I’d reccomend trying the latest 1.0.3 or 1.1 release to see if that happens to fix it, else check the ticket tracker to see if it’s already been reported (note that if it hasn’t been fixed yet it probably won’t be at all, since 1.1 is the last version to support 2.3).

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

Sidebar

Related Questions

I have a WPF window and many labels are using localized strings. For example
On a localized Iphone (Language set to Hebrew) when we view a webpage using
Using this answer , I created a sample localized app. My question is, is
I'm storing localized strings in a single datatable using MS Sql (2008 or whatever).
I'm using the Spark view engine, and want to localize the website. The methods
When the RequestFactory validates my domain objects using a jsr303 validator it gets localized
HI, I want to dynamically concatenating the strings using C#. I have localized string
We are using JAXB Annotations on our model objects that we return from our
I've generated pseudo-localized versions of an app's resource files (for example Order Summary and
I'm having trouble with sending localized messages to Django users using the user.message_set.create(message=Message) mechanism.

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.