per page, with , order by , clip by
Results of 1 - 1 of about 1 for MyThing (0.003 sec.)
翻訳 9414
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... t ( "month name" , "May" ) もしくは: from django.db import models from django.utils.translation import pgettext_lazy class MyThing ( models . Model ): name = models . CharField ( help_text = pgettext_lazy ( "help text for MyThing model" , "This is the h ... するためには、以下のようにします: from django.db import models from django.utils.translation import gettext_lazy as _ class MyThing ( models . Model ): name = models . CharField ( help_text = _ ( "This is the help text" )) verbose_name オプションを使えば ... 、 ForeignKey 、 ManyToManyField や OneToOneField リレーションシップの名前を翻訳可能にできます: class MyThing ( models . Model ): kind = models . ForeignKey ( ThingKind , on_delete = models . CASCADE , related_name = "kinds" , verbo ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
PREV 1 NEXT