Skip to content

Commit

Permalink
Added: usage of setLocale API.
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Mar 22, 2024
1 parent 2093080 commit eedb416
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { api, client, getConfig, initialise, logout, resetConfig, updateInstanceUrl, updateToken } from '@hotwax/oms-api'
import { api, client, getConfig, initialise, logout, resetConfig, updateInstanceUrl, updateToken, setUserLocale } from '@hotwax/oms-api'

export {
api,
Expand All @@ -8,5 +8,6 @@ export {
logout,
resetConfig,
updateInstanceUrl,
updateToken
updateToken,
setUserLocale
}
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { login, logout, loader } from './user-utils';
import permissionPlugin from '@/authorization';
import permissionRules from '@/authorization/Rules';
import permissionActions from '@/authorization/Actions';
import { getConfig, initialise } from '@/adapter'
import { getConfig, initialise, setUserLocale} from '@/adapter'
import localeMessages from './i18n/locales';

const app = createApp(App)
Expand All @@ -54,7 +54,8 @@ const app = createApp(App)
appLoginUrl: process.env.VUE_APP_LOGIN_URL as string,
getConfig: getConfig,
initialise: initialise,
localeMessages
localeMessages,
setUserLocale
});

// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters
Expand Down

0 comments on commit eedb416

Please sign in to comment.