How to import UGETTEXT_LAZY ON DJANGO 4.0

2,510 views
Skip to first unread message

ngal...@gmail.com

unread,
Dec 9, 2021, 11:44:15 PM12/9/21
to django...@googlegroups.com

It seems Django has removed ‘ugettext_lazy`(from django.utils.translation import ugettext_lazy as _) from Django version 4.0.x

How can I handle translation on Django version 4.0.x?

 

David Nugent

unread,
Dec 9, 2021, 11:50:53 PM12/9/21
to django...@googlegroups.com
Simply change it to gettext_lazy. You don't need the deprecated functions, they were for python 2.

Regards, David

On Fri, Dec 10, 2021 at 3:43 PM <ngal...@gmail.com> wrote:

It seems Django has removed ‘ugettext_lazy`(from django.utils.translation import ugettext_lazy as _) from Django version 4.0.x

How can I handle translation on Django version 4.0.x?

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/009b01d7ed80%246da44d40%2448ece7c0%24%40gmail.com.

ngal...@gmail.com

unread,
Dec 10, 2021, 12:01:03 AM12/10/21
to django...@googlegroups.com

Thanks hopefully the same to ugettext

 

Kind Regards

 

Ngallen Ramadhan

T: +255 765 889 960 | Emial: ngal...@gmail.com | Skype: ngallen2

Jason

unread,
Dec 10, 2021, 9:46:41 AM12/10/21
to Django users
Reply all
Reply to author
Forward
0 new messages