akkoma-fe/src/lib/post_language.js
2024-04-20 16:07:03 +03:00

16 lines
317 B
JavaScript

import iso6391 from 'iso-639-1'
import { computed } from 'vue'
export const usePostLanguageOptions = () => {
const postLanguageOptions = computed(() => {
return iso6391.getAllCodes().map(lang => ({
key: lang,
value: lang,
label: lang,
}));
})
return {
postLanguageOptions,
}
}