Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 26, 2024
1 parent bf5d316 commit 414e7fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const app = new App({
languages: ['en', 'ja'], // Supported languages
defaultLocale: 'en', // Default language
localesDir: './locales', // Directory path to JSON files
}, ['common', 'homepage'])) // Example of namespace customization
}))

await fsRoutes(app, {
loadIsland: (path) => import(`./islands/${path}`),
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsoul/fresh-i18n",
"version": "0.4.0",
"version": "0.5.0",
"description": "A simple and flexible internationalization (i18n) plugin for Deno's Fresh framework.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down
8 changes: 4 additions & 4 deletions src/i18nPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interface TranslationState {
}

/**
* i18nPlugin creates a middleware function for internationalization in a Fresh app.
* It initializes the locale and loads translations based on the user's preferences.
* Creates a middleware for internationalization in Fresh.
*
* @param options - Configuration options for the i18n plugin.
* @returns A middleware function that adds locale and translations to the context state.
* @param options - The configuration options for i18n.
* @param namespaces - An array of namespaces to load translations for.
* @returns A middleware function.
*/
export function i18nPlugin<T>(
options: I18nOptions,
Expand Down

0 comments on commit 414e7fb

Please sign in to comment.