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:
supalerk-ar66 2026-02-11 11:25:55 +07:00
parent e7a2ac8b5a
commit 7ead98375e
11 changed files with 107 additions and 43 deletions

View file

@ -27,11 +27,15 @@ onMounted(() => {
}
})
const { locale } = useI18n()
// Helper to get localized text
const getLocalizedText = (text: string | { th: string; en: string } | undefined) => {
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 || ''
}
// Data Handling