File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ export default defineNuxtModule<ModuleOptions>({
4545 nuxt . hook ( 'listen' , ( ) => {
4646 console . info ( `Appwrite Endpoint: ${ options . endpoint } ` )
4747 console . info ( `Appwrite Project: ${ options . project } ` )
48+ if ( options . locale ) {
49+ console . info ( `Appwrite Locale: ${ options . locale } ` )
50+ }
4851 } )
4952 } ,
5053} )
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { defineNuxtPlugin } from '#app'
2020export type AppwriteConfig = {
2121 endpoint : string
2222 project : string
23+ locale ?: string
2324}
2425
2526export type Appwrite = {
@@ -48,10 +49,14 @@ export default defineNuxtPlugin((nuxtApp) => {
4849 const config : AppwriteConfig = {
4950 endpoint : moduleOptions . endpoint || 'https://cloud.appwrite.io/v1' ,
5051 project : moduleOptions . project ,
52+ locale : moduleOptions . locale ,
5153 }
5254 const client = new Client ( )
5355 client . setEndpoint ( config . endpoint )
5456 client . setProject ( config . project )
57+ if ( config . locale ) {
58+ client . setLocale ( config . locale )
59+ }
5560
5661 return {
5762 provide : {
You can’t perform that action at this time.
0 commit comments