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

Commit

Permalink
refactor: rename startI18nClient
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Nov 9, 2020
1 parent 2fde605 commit b173dd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as sapper from "@sapper/app";
import "carbon-components-svelte/css/g10.css";
import { startClient } from "./services/i18n.js";
import { startI18nClient } from "services/i18n";

startClient();
startI18nClient();

sapper.start({
target: document.getElementById("sapper"),
target: document.getElementById("sapper")
});
3 changes: 1 addition & 2 deletions src/services/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { getCookie, setCookie } from "modules/cookie";

const INIT_OPTIONS: ConfigureOptions = {
fallbackLocale: "en",
initialLocale: null,
loadingDelay: 200,
formats: {
number: {
Expand Down Expand Up @@ -43,7 +42,7 @@ $locale.subscribe((locale: string) => {
if (typeof window !== "undefined") setCookie("locale", locale);
});

export const startClient = () => {
export const startI18nClient = () => {
init({
...INIT_OPTIONS,
initialLocale: getCookie("locale") || getLocaleFromNavigator(),
Expand Down

1 comment on commit b173dd8

@vercel
Copy link

@vercel vercel bot commented on b173dd8 Nov 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.