A Quick Intro to Translation in Django (Internationalization)

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024

ความคิดเห็น • 87

  • @prettyprinted
    @prettyprinted  4 ปีที่แล้ว +1

    Join my free course on the basics of using the database in Django: prettyprinted.com/djangodata

  • @ehsanbakefayat7378
    @ehsanbakefayat7378 ปีที่แล้ว +2

    Really clear and straightforward

  • @OswaldChisala
    @OswaldChisala 10 หลายเดือนก่อน

    You're an absolute legend, Anthony! Thank you my bro 🥳🏆

  • @hannibalbianchi1466
    @hannibalbianchi1466 2 ปีที่แล้ว

    Thank u I've been looking for this for a month.

  • @enriquemoraalonso6441
    @enriquemoraalonso6441 4 ปีที่แล้ว +20

    I think you forgot to define LOCALE_PATHS in settings. This give me an error.
    In Setting.py
    LOCALE_PATHS = [
    os.path.join(BASE_DIR, 'locale')
    ]

  • @hamzabouk5982
    @hamzabouk5982 4 ปีที่แล้ว +3

    This is why i love your channel. quick and straight to the point.
    Hope you keep this up
    Can we request a multi-tenant system in django with one db per tenant

  • @michaels6446
    @michaels6446 2 ปีที่แล้ว +2

    Very nice content! Thanks a lot! It would indeed be great to have a little deep-dive on this topic. Thinking about a multi-language page (supporting >2 languages), manual language selection and also some more info on how this would work with forms e.g. validation messages, fieldnames...

  • @Jjolasman
    @Jjolasman 3 ปีที่แล้ว +2

    How you got the gettext working with the django-admin makemessages - l ? I am having this error: CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed. I made the command: pip install python-gettext. but nothing is working

  • @androidwithseemant6390
    @androidwithseemant6390 ปีที่แล้ว

    it worked like magic, thanks for this tutorial

  • @sheriffcrandy
    @sheriffcrandy 2 ปีที่แล้ว +3

    How do you persist the language when navigating to a new page via a tag? I changed my language which works, but when I try to navigate to a new page, it reverts back to the default language instead of staying on the changed language

    • @paolocaradonna3294
      @paolocaradonna3294 2 ปีที่แล้ว

      have you found any solution to set the language in the session?

  • @tomask9588
    @tomask9588 4 ปีที่แล้ว +2

    Great video! But how can a user select their language directly on our website?

  • @olha_
    @olha_ 4 ปีที่แล้ว +9

    Great video, thanks Anthony! How can I make a button for the users to switch between languages manually?

  • @amirjodat4390
    @amirjodat4390 3 ปีที่แล้ว

    Useful. Thanks bro. please add another video for translation models in the forms tag.

  • @juliocefe1807
    @juliocefe1807 4 ปีที่แล้ว +10

    La traducción correcta sería "Hola, yo soy Antonio" o "Hola, soy Antonio " :), great video!!

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว +4

      Haha thanks. I didn't pay attention in my Spanish class

  • @Ricardo_Torales
    @Ricardo_Torales 2 ปีที่แล้ว

    Muchas gracias por el video, era exactamente lo que andaba buscando.

  • @dVicho
    @dVicho 4 หลายเดือนก่อน

    Hello, thak you for sahre this tutorial. I read the official guida but is not intuitive. I follow the video and works fine. Your spanish is good :D

  • @wanderer.1993
    @wanderer.1993 3 ปีที่แล้ว +1

    i didn't understand: you must MANUALLY set the translation? And every time a new input is added (like admin), i would need to compile the messages again? it didn't seen to be very pratical in a production enviorment, honestly...

  • @TomislavMiletic
    @TomislavMiletic ปีที่แล้ว

    Is there a way to automatically translate the website built with Django? Something like all those WordPress plugins that do automatic translation, but for Django platform.
    Thanks!

  • @Larriva666
    @Larriva666 8 หลายเดือนก่อน

    Привет! Какое расширение ты используешь для переключения языка в браузере?

  • @YukselCELIK
    @YukselCELIK 4 ปีที่แล้ว

    Thank you for this simple and goo video

  • @edwardmike5253
    @edwardmike5253 4 ปีที่แล้ว +1

    Great work

  • @KrishnaManohar8021
    @KrishnaManohar8021 4 ปีที่แล้ว +1

    I am currently doing ecommerce website. How can I change currency based IP/country based on user visit!

  • @sinancetinkaya
    @sinancetinkaya 4 ปีที่แล้ว

    Awesome as always Anthony, thanks!

  • @gabrielecocino8998
    @gabrielecocino8998 3 ปีที่แล้ว

    Thank you very much for this video.

  • @Shoorrtttiiiffffyyy
    @Shoorrtttiiiffffyyy 3 ปีที่แล้ว +1

    which extension you have used

  • @marcc1179
    @marcc1179 4 ปีที่แล้ว

    thank you! very clear explanation!

  • @MatheusHenrique-gb7is
    @MatheusHenrique-gb7is 3 ปีที่แล้ว

    I just loved your video! Too good! But the next time, can you turn up the volume of your voice?

  • @sebastianmorales1659
    @sebastianmorales1659 3 ปีที่แล้ว +1

    What is the name of the extension?

  • @rezervium
    @rezervium 4 ปีที่แล้ว +1

    hi , CommandError: Can't find xgettext. Make sure you have GNU gettext tools 0.15 or newer installed.
    what is tihs ı cant fixed ??

    • @rangarajann1781
      @rangarajann1781 4 ปีที่แล้ว

      You should install gettext manually on your system

  • @keshavsharma9380
    @keshavsharma9380 2 ปีที่แล้ว

    Thanks a lot!

  • @db44l
    @db44l 3 ปีที่แล้ว

    Hello, i have problem with translation of fields name form my model (model.py), how can i acces that field and translate them also?

  • @igorkomarov6607
    @igorkomarov6607 4 ปีที่แล้ว

    Thank You, Mr. Antony! Your videos returning my brains into my head from ... doesn't matter. P.S. Sublime --> VS Code --> VIM?))

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว

      It was actually VIM -> Sublime -> VS Code. I was all three regularly though

  • @pablomestre8571
    @pablomestre8571 4 ปีที่แล้ว

    Hi, great video. I store the idiom preferrence in a model call profile. How Im able to load the idiom from the profile user?

  • @dhrubkumarsharma6039
    @dhrubkumarsharma6039 2 ปีที่แล้ว

    But es link in yhe adressbar is not displaed when translated how to do that

  • @Adamigo123
    @Adamigo123 4 ปีที่แล้ว

    Dude, you're awesome!

  • @ahnafkhan8115
    @ahnafkhan8115 4 ปีที่แล้ว

    Hey Anthony, I wanted to know how you chose chrome as your browser in vs code? Great tutorials pal!!

  • @rahulsdev4405
    @rahulsdev4405 3 ปีที่แล้ว

    Hi, Great video.how can a user select their language directly on our website? Please reply

  • @ai.201
    @ai.201 2 ปีที่แล้ว

    Thanks

  • @fredj737
    @fredj737 4 ปีที่แล้ว

    Good job all the time

  • @shibome1590
    @shibome1590 3 ปีที่แล้ว

    thank you

  • @KeepCalmProgrammers
    @KeepCalmProgrammers 4 ปีที่แล้ว +1

    Video Request - Django Rest Framework - Converting exist project into api's (practical demo)
    I know rest but still confusing how to use it properly.

  • @franklucky9135
    @franklucky9135 4 ปีที่แล้ว

    this is good thanks how to change the admin area

  • @kishoreandra
    @kishoreandra 4 ปีที่แล้ว

    Anthony needed the same with flask 🤝

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว +1

      I have some videos around for this on Flask in my course called The Flask Extensions Course

    • @kishoreandra
      @kishoreandra 4 ปีที่แล้ว

      @@prettyprinted ✊🏻TFI mate

  • @thezquad
    @thezquad 4 ปีที่แล้ว +1

    What about currency and other localizations?

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว

      Definitely could be done. I'll consider making a follow up video.

  • @hamadalmogbl8959
    @hamadalmogbl8959 4 ปีที่แล้ว

    thank you very much

  • @jotaro9305
    @jotaro9305 3 ปีที่แล้ว

    Pls what is the name of the plugin you use to change your browser language ?

    • @عبدالعزيزسيد-غ1خ
      @عبدالعزيزسيد-غ1خ 3 ปีที่แล้ว +2

      The extension that he used to change language is called "Locale Switcher"
      linked: chrome.google.com/webstore/detail/locale-switcher/kngfjpghaokedippaapkfihdlmmlafcc/related?hl=en

    • @jotaro9305
      @jotaro9305 3 ปีที่แล้ว +1

      @@عبدالعزيزسيد-غ1خ thk you very much ! 👍

  • @iloun1338
    @iloun1338 4 ปีที่แล้ว

    Hi, how can I translate static value in template ?

  • @abctran8164
    @abctran8164 3 ปีที่แล้ว

    thank

  • @mohako98
    @mohako98 4 ปีที่แล้ว

    thank you for such useful video ,, but please how can i switch between 2 lang inside the app itself not by browser

    • @bryanDaMazo16
      @bryanDaMazo16 3 ปีที่แล้ว

      What do you mean? He did the translation by himself

    • @mohako98
      @mohako98 3 ปีที่แล้ว

      @@bryanDaMazo16
      I mean something like a navigation button en/ar
      Or a radio button in the header
      Not change language from settings of browser

    • @bryanDaMazo16
      @bryanDaMazo16 3 ปีที่แล้ว

      @@mohako98 Then, there are many approaches. The first would be to make 2 websites in different languages and with a button-action, load the other page. Easy but repetitive. The other that I prefer is to write a function in javascript, a translator function that maps every item that needs to be translated to its language. Easier to scale since if you add support for another language, you just need to update the data for mapping, and the function will take care of the rest, and that my friend you enter in the big area of accessibility. Your backend has to identify the user country to load the correct language. Otherwise, it would send the default and you don't send all the language in one call for performance issues.

  • @hejhej3714
    @hejhej3714 4 ปีที่แล้ว

    Could you please make a updated video flask-sqlalchemy whoosh?

  • @Larriva666
    @Larriva666 8 หลายเดือนก่อน

    Привет! Спасибо!

  • @rezervium
    @rezervium 4 ปีที่แล้ว

    How can Trans Django Models ??? sir :(

  • @ProSimples
    @ProSimples 3 ปีที่แล้ว

    The sad is that, there is nobody talking abou how to translate in django rest framework.

  • @delllatitude299
    @delllatitude299 4 ปีที่แล้ว

    nice tutorial.
    but how can we make this good like
    eng:
    example.com/en/
    chinese
    exampl.com/cn/

  • @sanant8748
    @sanant8748 3 ปีที่แล้ว

    In Spanish "Mi nombre es : " "Yo soy:"

  • @richardclark4111
    @richardclark4111 4 ปีที่แล้ว

    Damm.... Bro, U r the best !!!
    locale UA: Привіт з України !!!

  • @ErikDJ123
    @ErikDJ123 3 ปีที่แล้ว

    Helpful tutorial. Good thing you aren't teaching spanish!

  • @bahadorpourhosseini4185
    @bahadorpourhosseini4185 ปีที่แล้ว

    thanks