国际化

This commit is contained in:
John
2024-03-09 01:04:20 +08:00
parent 80dbf50d4b
commit 0494fbd364
3 changed files with 31 additions and 13 deletions

View File

@@ -16,7 +16,18 @@
</div>
</template>
<script setup lang="ts">
import { getDefaultLocal } from '@/api/system/user';
const lang = localStorage.getItem('lang')
if (!lang) {
getDefaultLocal().then(res => {
console.log('res', res)
if (res === 'gu_IN') {
localStorage.setItem('lang', 'id')
} else {
localStorage.setItem('lang', 'zh')
}
})
}
</script>
<style>