feat(i18n): 공통/주요 화면 문자열 치환, 포맷 정책 적용, 언어 전환 UX 및 스캔 스크립트 추가
This commit is contained in:
43
src/App.vue
43
src/App.vue
@@ -7,8 +7,19 @@
|
||||
dark
|
||||
>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>보이스온 크리에이터 관리자</v-toolbar-title>
|
||||
<v-toolbar-title>{{ $t('common.app.title') }}</v-toolbar-title>
|
||||
<v-spacer />
|
||||
<v-select
|
||||
v-model="selectedLocale"
|
||||
class="ma-0 mr-4"
|
||||
dense
|
||||
hide-details
|
||||
outlined
|
||||
:items="localeItems"
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
style="max-width: 150px"
|
||||
/>
|
||||
</v-app-bar>
|
||||
|
||||
<v-main>
|
||||
@@ -17,6 +28,36 @@
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppRoot',
|
||||
data() {
|
||||
return {
|
||||
selectedLocale: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
localeItems() {
|
||||
return [
|
||||
{ value: 'ko', text: this.$t('common.lang.ko') },
|
||||
{ value: 'en', text: this.$t('common.lang.en') },
|
||||
{ value: 'ja', text: this.$t('common.lang.ja') }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedLocale(v) {
|
||||
if (!v) return
|
||||
this.$i18n.locale = v
|
||||
try { localStorage.setItem('locale', v) } catch (e) { /* ignore */ }
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.selectedLocale = this.$i18n && this.$i18n.locale ? this.$i18n.locale : 'ko'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
|
||||
Reference in New Issue
Block a user