ʻO nā faila e pili ana i nā wahi i helu ʻia ma ke kiʻi ma luna nei:
.i18n/htm/t1.pug
.i18n/htm/t2.pug
ʻO pug
kahi ʻōlelo maʻamau e hoʻopuka ana i HTML
's.
➔ Kaomi ma aneʻi e aʻo i ka grammar o pug
Hoʻohana ʻia ka string format ${I18N.sponsor}
i ka faila no ka hoʻokō ʻana i ka internationalization, a e hoʻololi ʻia kona ʻike me ka kikokikona e i18n.yml ana i loko o ka papa kuhikuhi ʻōlelo kumu.
ʻO ka faila e pili ana i ke ʻano o ka pae hoʻokele .i18n/htm/topbar.css
:
[!WARN] Mai kākau i
css
a mejs
ipug
, i ʻole e hewa.
ʻAʻole hiki ke kākau ʻia js
ma pug
Inā makemake ʻia ka pilina, hiki ke hoʻokō ʻia ma ka hana ʻana i kahi mea pūnaewele.
Hiki i nā ʻāpana ke wehewehe i kahi ʻaoʻao pūnaewele ma md/.i18n/htm/index.js
a laila hoʻohana i ka ʻāpana i foot.pug
.
He mea maʻalahi ka hana ʻana i nā ʻāpana pūnaewele, e like me <x-img>
maʻamau0 .
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);
}
}
)
I kēia manawa ua kuhikuhi ʻia ʻo x/i-h.js
ma md/.i18n/htm/index.js
, ʻo ia kahi ʻāpana pūnaewele i hoʻohana ʻia no ka hoʻokele honua ʻana a me nā kikokikona maʻiʻo footer E ʻike i ke kumu kumu 18x/src/i-h.js