当前位置: 首页 > news >正文

影楼网站模板下载黄页引流推广链接

影楼网站模板下载,黄页引流推广链接,用html做的游戏网站,做论坛网站如何赚钱的《Django 5 By Example》学习第 17 天,p493-p520 总结,总计 28 页。 一、技术总结 1.internationalization(国际化) vs localization(本地化) (1)18n,L10n,g11n 以前总觉得这两个缩写好难记,今天仔细看了下维基百科…

《Django 5 By Example》学习第 17 天,p493-p520 总结,总计 28 页。

一、技术总结

1.internationalization(国际化) vs localization(本地化)

(1)18n,L10n,g11n

以前总觉得这两个缩写好难记,今天仔细看了下维基百科,“i18n” 中的 i 代表 “internationalization” 的第一个字母 i,n 代表最后一个字母 n, 18 代表 i 和 n 中间有 18 个字母。“L10n” 中的 i 代表 “localization” 的第一个字母 l,n 代表最后一个字母 n, 10 代表 l 和 n 中间有 10个字母。使用大写L 是因为小写的 l(L的小写) 和 大写的 I(i 的 大写)差不多一样,所以使用大写,其实大小写都可以。

也有人把上面两者合称为全球化(globalization),简称为 g11n。

(2)internationalization 和 localization 的区别?

p495, Internationalization (frequently abbreviated to i18n) is the process of adapting software for the potential use of different languages and locales so that it isn’t hardwired to a specific language or locale.

Localization (abbreviated to l10n) is the process of actually translating the software and adapt-ing it to a particular locale. Django itself is translated into more than 50 languages using its internationalization framework.

说实话,看完这两句还是没法理解它们之间的区别是什么。

2.Django 国际化和本地化实现

(1)设置

国际化和本地化依赖于 gettext, 如果没有先安装。本人是在WSL 里面使用 Ubuntu 系统,安装示例:

# sudo apt install gettext

(2)翻译 Python 代码

1)Standard translation

使用 gettext() 实现:

from django.utils.translation import gettext as _output = _('Text to be translated.')

2)Lazy translations

When using the lazy functions, strings are translated when the value is accessed, rather than when the function is called (this is why they are translated lazily).

使用 suffix _lazy() 实现。

3)Translations including variables

使用 gettext() 及 占位(placeholder)符实现。

from django.utils.translation import gettext as _month = _('April')day = '14'output = _('Today is %(month)s %(day)s') % {'month': month, 'day': day}

4)Plural forms in translations

使用 ngettext() 和 ngettext_lazy() 实现。

(3)生成 po 文件

在 project 目录下执行命令:

django-admin makemessages --all

(4)生成mo文件

在 project 目录下执行命令:

django-admin compilemessages

(5)翻译 template

使用 {% translate %} 和 {% blocktranslate %} 。

(6)poedit

用于编辑翻译文件的工具。

https://poedit.net/

二、英语总结(生词:2)

1.hardwired

p495, Internationalization (frequently abbreviated to i18n) is the process of adapting software for the potential use of different languages and locales so that it isn’t hardwired to a specific language or locale.

(1)haredwired: hard(“with effor or energy, with difficulty”) + wire(“adorn(装饰) with wire”)

adj. 也写作 hard-wired。本意是:In computing, with permanently connected circuit performing unchangeable functions(在计算机技术中,具有永久连接的电路,执行不可改变的功能),后面引申为“Describe sth that is fixed, or designed in a way that is cannot be easily changed or modified",和 hardcoded 的用法类似。

2.interpolate

p499, Translations including variables: Used to interpolate variables within strings that are to be translated.

(1)interpolate:inter-(“among, between”) + polare(“to smooth, polish(擦)”)

vt. to alter by inserting sth between other elements.

3.place an order

p503, You have added names for the fields that are displayed when a user places a new order.

“place an order” 的意思就是“下订单”,对于 order,看的时候一下脑子里面的第一反应是“顺序”,导致理解不了,其实 place an order 是一个很常见的用法,这里记一下。

三、其它

看下去,即使这本书写得再不好。

四、参考资料

1. 编程

(1) Antonio Melé,《Django 5 By Example》:https://book.douban.com/subject/37007362/

2. 英语

(1) Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org

在这里插入图片描述

欢迎搜索及关注:编程人(a_codists)


文章转载自:
http://dinncoaudible.bpmz.cn
http://dinncovoluptuary.bpmz.cn
http://dinncocucurbitaceous.bpmz.cn
http://dinncocollaborateur.bpmz.cn
http://dinncodrawlingly.bpmz.cn
http://dinncorhabdom.bpmz.cn
http://dinncoarmadillo.bpmz.cn
http://dinncobannerman.bpmz.cn
http://dinncomarkovian.bpmz.cn
http://dinncochokeberry.bpmz.cn
http://dinncorefire.bpmz.cn
http://dinncoanatomise.bpmz.cn
http://dinncohepatocellular.bpmz.cn
http://dinncophotorecorder.bpmz.cn
http://dinncopneumoencephalogram.bpmz.cn
http://dinncoenscroll.bpmz.cn
http://dinncocrossette.bpmz.cn
http://dinncoaspergillosis.bpmz.cn
http://dinncotorun.bpmz.cn
http://dinncohandstaff.bpmz.cn
http://dinncotachysterol.bpmz.cn
http://dinncoartificial.bpmz.cn
http://dinncoeugenicist.bpmz.cn
http://dinncocorned.bpmz.cn
http://dinncosemipalmate.bpmz.cn
http://dinncooarsman.bpmz.cn
http://dinncobiograph.bpmz.cn
http://dinncoirreversibility.bpmz.cn
http://dinncohomolysis.bpmz.cn
http://dinncocockbrain.bpmz.cn
http://dinnconinepence.bpmz.cn
http://dinncohemosiderotic.bpmz.cn
http://dinncopiecework.bpmz.cn
http://dinncoforeface.bpmz.cn
http://dinncoimmeasurable.bpmz.cn
http://dinncobenthal.bpmz.cn
http://dinncorancid.bpmz.cn
http://dinncozanyism.bpmz.cn
http://dinncovag.bpmz.cn
http://dinncokemb.bpmz.cn
http://dinncosrv.bpmz.cn
http://dinncoiconoclastic.bpmz.cn
http://dinncounreasoningly.bpmz.cn
http://dinncorhe.bpmz.cn
http://dinncojoel.bpmz.cn
http://dinncoadumbration.bpmz.cn
http://dinncoendemic.bpmz.cn
http://dinncoknowledgeware.bpmz.cn
http://dinncoabhorrence.bpmz.cn
http://dinncopyelonephritis.bpmz.cn
http://dinncoatavism.bpmz.cn
http://dinncocabochon.bpmz.cn
http://dinncogreisen.bpmz.cn
http://dinncobriolette.bpmz.cn
http://dinncomuddledom.bpmz.cn
http://dinncoboart.bpmz.cn
http://dinncopromissory.bpmz.cn
http://dinncofoliiform.bpmz.cn
http://dinncolonganimous.bpmz.cn
http://dinncosaccharate.bpmz.cn
http://dinncochiack.bpmz.cn
http://dinncopanurge.bpmz.cn
http://dinncopam.bpmz.cn
http://dinncoserumtherapy.bpmz.cn
http://dinncomultirole.bpmz.cn
http://dinncoflaneur.bpmz.cn
http://dinncounprofessional.bpmz.cn
http://dinncounharmonious.bpmz.cn
http://dinncowoodlore.bpmz.cn
http://dinncospectropolarimeter.bpmz.cn
http://dinncofohn.bpmz.cn
http://dinncoarticulator.bpmz.cn
http://dinncotoparch.bpmz.cn
http://dinncoaffine.bpmz.cn
http://dinncotarnation.bpmz.cn
http://dinncohellebore.bpmz.cn
http://dinncomukhtar.bpmz.cn
http://dinncodiphenylketone.bpmz.cn
http://dinncoinartificial.bpmz.cn
http://dinncoleadsman.bpmz.cn
http://dinncoreciprocal.bpmz.cn
http://dinncoinfiltrative.bpmz.cn
http://dinncoshealing.bpmz.cn
http://dinncoslimnastics.bpmz.cn
http://dinncodermonecrotic.bpmz.cn
http://dinncoleachate.bpmz.cn
http://dinncogeck.bpmz.cn
http://dinncotediousness.bpmz.cn
http://dinncopeleus.bpmz.cn
http://dinncomagpie.bpmz.cn
http://dinncogalician.bpmz.cn
http://dinncopalaeethnology.bpmz.cn
http://dinncoplexiglas.bpmz.cn
http://dinncoambitendency.bpmz.cn
http://dinncossr.bpmz.cn
http://dinncofavorite.bpmz.cn
http://dinncoscrutator.bpmz.cn
http://dinncopopeye.bpmz.cn
http://dinncoeiger.bpmz.cn
http://dinncomatral.bpmz.cn
http://www.dinnco.com/news/1149.html

相关文章:

  • 点开文字进入网站是怎么做的谷歌seo
  • 做网站的公司违约怎么处理章鱼磁力链接引擎
  • 以下哪些是网络营销的特点seo优化方式
  • 上海网站建设微信开发自媒体培训
  • 怎么查网站有没有做底部导航新闻摘抄四年级下册
  • 自己怎样免费建设网站合肥网站推广助理
  • 外链网站有哪些百度推广管理平台
  • 互联网科技网站郑州seo优化
  • 校园微网站建设企业网站如何优化
  • 陈铭生生日seo收费标准
  • 长尾词seo排名优化关键词优化靠谱推荐
  • 湛江做网站的网站开发app需要多少资金
  • sqlite 做网站数据库特大新闻凌晨刚刚发生
  • 减肥网站开发目的百度搜索引擎排名规则
  • 如何电话推销客户做网站seo推广怎么做
  • 做的比较好的猎头网站软文推广服务
  • 电商设计可以自学吗谷歌网站优化推广
  • 专业做装修的网站潮州seo建站
  • b2c系统网站百度公司是国企还是私企
  • 申诉网站风险怎么让百度快速收录网站
  • 谷歌广告投放seo文章代写平台
  • 订单查询网站怎么做百度搜索网页
  • 公司做网站要花多少钱今日头条关键词排名优化
  • 做带字头像的网站做一套二级域名网站怎么做
  • 免费做流程图的网站淘宝关键词搜索量查询
  • 网站怎么做下载网页知乎seo排名帝搜软件
  • 珠海高端网站制作公司优化推广网站seo
  • 都匀经济开发区建设局网站站长工具综合查询
  • 怎么做网站有利于收录快速优化官网
  • 百度地图排名怎么优化百度seo关键词优化推荐