feat: Implement core e-learning features including course discovery, classroom components, user profile management, and internationalization for English and Thai.
This commit is contained in:
parent
e7a2ac8b5a
commit
7ead98375e
11 changed files with 107 additions and 43 deletions
|
|
@ -19,11 +19,15 @@ const emit = defineEmits<{
|
|||
(e: 'open-announcements'): void;
|
||||
}>();
|
||||
|
||||
const { locale } = useI18n()
|
||||
|
||||
// Helper for localization
|
||||
const getLocalizedText = (text: any) => {
|
||||
if (!text) return ''
|
||||
if (typeof text === 'string') return text
|
||||
return text.th || text.en || ''
|
||||
|
||||
const currentLocale = locale.value as 'th' | 'en'
|
||||
return text[currentLocale] || text.th || text.en || ''
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue