Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: centralized language switcher (#141) #168

Closed
wants to merge 3 commits into from

Conversation

sanskar345
Copy link
Contributor

Closes #141

Description:

  • Created a component for a language switcher.
  • taking the translate function as options in dxp from the app and exporting it from index.ts to use in the component

Steps to verify:

-- Language switch functionality.
-- No warnings in the app.

const appState = appContext.config.globalProperties.$store
const locales = process.env.VUE_APP_LOCALES ? JSON.parse(process.env.VUE_APP_LOCALES) : { "en": "English" };
const locale = computed(() => appState.getters['user/getLocale']);
const setLocale = async (locale: string) => {

Choose a reason for hiding this comment

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

This does not need to be an async function.

@alsoK2maan
Copy link

Closing as done through #173

@alsoK2maan alsoK2maan closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Centralized Language Switcher
2 participants