Skip to content

Commit 02f3b73

Browse files
committed
feat(i18n): add i18n-js partial for internationalization support
1 parent 1496518 commit 02f3b73

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{{ partial "seo" . }}
66
{{ partial "styles" . }}
77
{{ partial "scripts" . }}
8+
{{ partial "i18n-js" . }}
89
</head>
910
<body class="fs-7 fw-400 preload">
1011
<div class="template flex column">

layouts/partials/i18n-js.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{- $i18n := dict
2+
"copy" (i18n "copy")
3+
"copied" (i18n "copied")
4+
-}}
5+
6+
<script>
7+
window.I18N = {{ $i18n | jsonify | safeJS }};
8+
</script>

0 commit comments

Comments
 (0)