Kuyenda Mwamakonda

Tiyeni titenge tsamba i18n-demo.github.io ngati chitsanzo chofotokozera momwe mungasinthire makonda.

Mafayilo ogwirizana ndi madera omwe ali ndi manambala omwe ali pamwambapa ndi awa:

  1. Kumanzere .i18n/htm/t1.pug
  2. Chabwino .i18n/htm/t2.pug

pug ndi chilankhulo cha template chomwe chimapanga HTML 's.

➔ Dinani apa kuti muphunzire galamala ya pug

Chingwe chamtundu ${I18N.sponsor} chimagwiritsidwa ntchito mufayilo kuti agwiritse ntchito kumayiko ena, ndipo zomwe zili m'malo mwake zidzasinthidwa ndi mawu olingana i18n.yml mu bukhu la chinenero choyambira.

Fayilo yogwirizana ndi kalembedwe ka navigation bar .i18n/htm/topbar.css :

[!WARN] Osalemba css ndi js mu pug , apo ayi padzakhala cholakwika.

Zida Zapaintaneti

js sichikhoza kulembedwa mu pug Ngati kuyanjana kuli kofunikira, kungapezeke mwa kupanga gawo la intaneti.

Zigawo zimatha kufotokozera gawo latsamba lawebusayiti mu md/.i18n/htm/index.js ndiyeno gwiritsani ntchito gawolo mu foot.pug .

Ndikosavuta kupanga zida zapaintaneti, monga <x-img> .

customElements.define(
  'x-img',
  class extends HTMLElement {
    constructor() {
      super();
      var img = document.createElement('img');
      img.src = '//p.3ti.site/i18n.svg';
      img.style = "height:99px;width:99px;";
      this.append(img);
    }
  }
)

Panopa x/i-h.js akutchulidwa mu md/.i18n/htm/index.js , yomwe ndi gawo 18x/src/i-h.js intaneti lomwe limagwiritsidwa ntchito popanga maulendo apadziko lonse ndi zolemba zapamunsizi