Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
🌐 Internationalize the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Nov 9, 2023
1 parent 5804a7a commit 6237377
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/navbar/NavItem.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { navData } from '../../constants/nav';
import { i } from '../../languages/i18n';
import { settings } from '../../stores';
import { currentLanguage, settings } from '../../stores';
export let uri: string;
export let currentUri: string;
Expand All @@ -20,9 +20,15 @@
showText = s.showTextInNavbar;
});
const text = i(`nav.${title}`, {}, {
let text = i(`nav.${title}`, {}, {
transform: 'capitalize'
} as const);
currentLanguage.subscribe(() => {
text = i(`nav.${title}`, {}, {
transform: 'capitalize'
} as const);
});
</script>

<a
Expand Down

0 comments on commit 6237377

Please sign in to comment.