Skip to content

Commit

Permalink
Merge pull request #521 from pycontw/feat/add-icon-on-locale-switch
Browse files Browse the repository at this point in the history
feat(header/locale): add icon and adjust
  • Loading branch information
SivanYeh authored May 11, 2024
2 parents 1ccaa7f + ce0507d commit c03352d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/core/header/locale-switch/LocaleSwitch.i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { genI18nMessages } from '~/utils/i18n.utils'
export default genI18nMessages({
'en-us': {
'en-us': 'EN',
'zh-hant': 'ZH',
'zh-hant': '中文',
},
'zh-hant': {
'en-us': '英文',
'en-us': 'EN',
'zh-hant': '中文',
},
})
5 changes: 5 additions & 0 deletions components/core/header/locale-switch/LocaleSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<div class="core-localeSwitch h-full">
<nav-bar-item-dropdown sm>
<template #label>
<img
src="~/static/locale-icon.svg"
:alt="`Locale Icon`"
class="w-4 pr-1"
/>
{{ $t($i18n.locale) }}
</template>
<template v-slot:items="{ hideMenu }">
Expand Down
3 changes: 3 additions & 0 deletions static/locale-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c03352d

Please sign in to comment.