html 标题标签国际化 - i18n

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 标题标签国际化 - i18n相关的知识,希望对你有一定的参考价值。

<!-- in theme.liquid -->

{% if current_tags %}{% assign meta_tags = current_tags | join: ', ' %}{% endif %}
<title>
{{ page_title }}{% if current_tags %} &ndash; {{ 'general.meta.tagged' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} &ndash; {{ 'general.meta.page' | t: page_number: current_page }}{% endif %}{% unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless %}
</title>

<!-- in locales/en.default.json -->

{
  "general":{
    "meta":{
      "tagged":"tagged \"{{ tags }}\"",
      "page":"Page {{ page_number }}"
    },
    ....
  },
  ....
}

以上是关于html 标题标签国际化 - i18n的主要内容,如果未能解决你的问题,请参考以下文章

低代码平台多语言国际化(i18n)技术方案

python国际化 i18n 和中英文切换

JSTL标签库

SpringBoot系列——i18n国际化

(二十七)JSP标签之核心标签

Angular 国际化 (i18n) 和 *ngFor