i18n
#

We made a separated config for i18n messages, so you can redefine messages we use in components.

Translations
#

KeyValue

back

Previous

backToTop

back to top

breadcrumbs

breadcrumbs

cancel

Cancel

carousel

carousel

close

close

closeAlert

close alert

closeToast

close toast

color

color

colorName

color {color}

colorSelection

color selection

counterValue

counter value

currentRating

current rating {value} of {max}

decreaseCounter

decrease counter

dropzone

Drop files here to upload

fileDeleted

File deleted

finish

Finish

goLastPage

go last page

goNextPage

go next page

goNextSlide

go next slide

goPreviousSlide

go previous slide

goSlide

go slide {index}

goToPreviousPage

go to the previous page

goToSpecificPage

go to the {page} page

goToSpecificPageInput

enter the page number to go

goToTheFirstPage

go to the first page

increaseCounter

increase counter

inputField

Input field

loading

Loading

movePaginationLeft

move pagination left

movePaginationRight

move pagination right

next

Next

nextPeriod

next period

noOptions

Items not found

noSelectedOption

Option is not selected

ok

OK

openColorPicker

open color picker

optionsFilter

options filter

pagination

pagination

previousPeriod

previous period

progress

progress

progressState

progress state

removeFile

remove file

reset

reset

resetDate

reset date

resetTime

reset time

search

Search

selectAllRows

select all rows

selectedDate

selected date

selectedOption

Selected option

selectedTime

selected time

selectRowByIndex

select row {index}

slideOf

slide {index} of {length}

sliderValue

Current slider value is {value}

sortColumnBy

sort column by {name}

splitPanels

split panels

step

step

switch

Switch

switchView

switch view

toggleDropdown

toggle dropdown

undo

Undo

uploadFile

Upload file

voteRating

vote rating {value} of {max}

Change default messages
#

Default messages can be set in GlobalConfig. Config is fully typed, so you can use autocomplete to find messages you want to change.

import { createVuestic } from "vuestic-ui";

createApp(App)
  .use(
    createVuestic({
      config: {
        // ...

        i18n: {
          ok: "ะ”ะพะฑั€ะต",
          cancel: "ะกะบะฐััƒะฒะฐั‚ะธ",
          search: "ะŸะพัˆัƒะบ",

          // ...
        },
      },
    })
  )
  .mount("#app");

Changing language in runtime
#

If you have more than one language, you can update messages in runtime with useI18nConfig hook from VuesticUI.

import { useI18nConfig } from "vuestic-ui";

const locale = ref("en");

const messages = {
  en: {
    search: "Search",
  },
  ua: {
    search: "ะŸะพัˆัƒะบ",
  },
};

watch(locale, (newLocale) => {
  mergeIntoConfig(messages[newLocale]);
});

Using with vue-i18n
#

If you use vue-i18n we can recommend to store VuesticUI messages under specific key

import { useI18nConfig } from "vuestic-ui";
import { useI18n } from "vue-i18n";

const { locale, messages } = useI18n();
const { mergeIntoConfig } = useI18nConfig();

watch(locale, (newLocale) => {
  mergeIntoConfig(messages[newLocale]["vuestic"]);
});