Skip to content

Commit 5b6f81c

Browse files
committed
Add English translation and locale configuration
Add English locale support with automatic redirect based on browser language. Configure locale dropdown with Hungarian and English options. Remove blog functionality and announcement bar. Include English translations for all UI strings and blog content.
1 parent 86f4454 commit 5b6f81c

File tree

25 files changed

+1064
-37
lines changed

25 files changed

+1064
-37
lines changed

docusaurus.config.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,31 @@ const config: Config = {
1818
onBrokenMarkdownLinks: 'warn',
1919
},
2020
},
21-
// TODO: Add English translation
2221
i18n: {
2322
defaultLocale: 'hu',
24-
locales: ['hu'],
23+
locales: ['hu', 'en'],
24+
localeConfigs: {
25+
hu: {
26+
label: 'Magyar',
27+
direction: 'ltr',
28+
htmlLang: 'hu',
29+
},
30+
en: {
31+
label: 'English',
32+
direction: 'ltr',
33+
htmlLang: 'en',
34+
},
35+
},
2536
},
26-
plugins: [tailwindPlugin],
37+
plugins: [
38+
tailwindPlugin,
39+
() => ({
40+
name: 'locale-redirect-plugin',
41+
getClientModules() {
42+
return ['./src/clientModules/localeRedirect.ts'];
43+
},
44+
}),
45+
],
2746
presets: [
2847
[
2948
'classic',
@@ -33,13 +52,7 @@ const config: Config = {
3352
editUrl:
3453
'https://github.com/hufilter/hufilter.github.io/tree/main/',
3554
},
36-
blog: {
37-
showReadingTime: true,
38-
// Please change this to your repo.
39-
// Remove this to remove the "edit this page" links.
40-
editUrl:
41-
'https://github.com/hufilter/hufilter.github.io/tree/main/',
42-
},
55+
blog: false,
4356
theme: {
4457
customCss: './src/css/custom.css',
4558
},
@@ -48,14 +61,6 @@ const config: Config = {
4861
],
4962

5063
themeConfig: {
51-
announcementBar: {
52-
id: 'notice',
53-
content:
54-
'A hufilter.hu tartalma kialakítás alatt van. Az oldal jelenleg tesztüzemben működik.',
55-
backgroundColor: '#fafbfc',
56-
textColor: '#091E42',
57-
isCloseable: true,
58-
},
5964
image: 'img/social-card.png',
6065
navbar: {
6166
title: 'hufilter',
@@ -91,7 +96,6 @@ const config: Config = {
9196
// position: 'left',
9297
// label: 'Wiki',
9398
// },
94-
{to: '/blog', label: 'Blog', position: 'left'},
9599
{
96100
type: 'localeDropdown',
97101
position: 'right',
@@ -135,10 +139,6 @@ const config: Config = {
135139
{
136140
title: 'Egyéb',
137141
items: [
138-
{
139-
label: 'Blog',
140-
to: '/blog',
141-
},
142142
{
143143
label: 'GitHub',
144144
href: 'https://github.com/hufilter/hufilter',

0 commit comments

Comments
 (0)