Skip to content

Commit

Permalink
fix: config stub
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 20, 2023
1 parent 9c6e063 commit f37d2f1
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions stubs/config.stub
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{{{
exports({ to: app.configPath('i18n.ts') })
}}}
import { defineConfig } from '@adonisjs/i18n'
import app from '@adonisjs/core/services/app'
import { defineConfig, formatters, loaders } from '@adonisjs/i18n'

export default defineConfig({
defaultLocale: 'en',
formatter: 'icu',
formatter: formatters.icu(),

loaders: [
{
/**
* The fs loader will read translations from the
* "resources/lang" directory.
*
* Each subdirectory represents a locale. For example:
* - "resources/lang/en"
* - "resources/lang/fr"
* - "resources/lang/it"
*/
driver: 'fs',
location: app.languageFilesPath(),
}
/**
* The fs loader will read translations from the
* "resources/lang" directory.
*
* Each subdirectory represents a locale. For example:
* - "resources/lang/en"
* - "resources/lang/fr"
* - "resources/lang/it"
*/
loaders.fs({
location: app.languageFilesPath()
}),
],
})

0 comments on commit f37d2f1

Please sign in to comment.