Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: fix korean language
Browse files Browse the repository at this point in the history
  • Loading branch information
Frecherenkel60 committed Jul 13, 2023
1 parent 25f314e commit 6b38f50
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"languages": {
"en": "Englisch",
"de": "Deutsch",
"kor": "Koreanisch"
"ko": "Koreanisch"
},
"logout": "Abmelden",
"search": "Durchsuche deine Reisen..."
Expand Down
2 changes: 1 addition & 1 deletion languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"header": {
"languages": {
"en": "English",
"kor": "Korean",
"ko": "Korean",
"de": "German"
},
"logout": "Logout",
Expand Down
2 changes: 1 addition & 1 deletion languages/kor.json → languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"languages": {
"en": "엉어",
"de": "독일어",
"kor": "한국어"
"ko": "한국어"
},
"logout": "로그아웃",
"search": "여행 겁색..."
Expand Down
5 changes: 3 additions & 2 deletions src/components/general/_LanguageSelector.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { i, language, loadResource, switchLanguage } from '@inlang/sdk-js';
import { ListBox, ListBoxItem, popup, type PopupSettings } from '@skeletonlabs/skeleton';
import { De, Us, Kr } from 'svelte-flag-icons';
import { De, Kr, Us } from 'svelte-flag-icons';
let languages = [
{ id: 'en', title: i('header.languages.en'), icon: Us },
{ id: 'kor', title: i('header.languages.kor'), icon: Kr },
{ id: 'ko', title: i('header.languages.ko'), icon: Kr },
{ id: 'de', title: i('header.languages.de'), icon: De }
];
Expand All @@ -29,6 +29,7 @@
const switchLanguageHandler = async (e: MouseEvent) => {
const value = (e.target as HTMLButtonElement).value;
console.log(`Switching language to: ${value}`);
await switchLanguage(value);
// Switch language titles for the current language
Expand Down
5 changes: 3 additions & 2 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const unauthorizedRoutes = [
'/api/users/verify-reset-token', // Verify reset token API
'/api/users/reset-password', // Reset password API
'/inlang/en.json', // Inlang API for English
'/inlang/de.json' // Inlang API for German
'/inlang/de.json', // Inlang API for German
'/inlang/ko.json' // Inlang API for Korean
];

export const handle: Handle = async ({ event, resolve }) => {
Expand Down Expand Up @@ -94,7 +95,7 @@ export const handleFetch: HandleFetch = ({ event, request, fetch }) => {
console.log(`Outgoing request to ${url}`);

if (PUBLIC_BASE_URL === url.origin) {
request.headers.set('Authorization', event.request.headers.get('Authorization') || '');
request.headers.set('Authorization', event.request.headers.get('Authorization') ?? '');
}

return fetch(request);
Expand Down

0 comments on commit 6b38f50

Please sign in to comment.