mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
support multi languages
This commit is contained in:
1 parent
ca8ff2f983
commit
72a832c781
24 files changed
+995
-175
No files matched your search
@@ -0,0 +1,89 @@
|
||||
export const strings = {
|
||||
nav: {
|
||||
home: { en: 'Home', vi: 'Trang chủ' },
|
||||
about: { en: 'About', vi: 'Giới thiệu' },
|
||||
experience: { en: 'Experience', vi: 'Kinh nghiệm' },
|
||||
projects: { en: 'Projects', vi: 'Dự án' },
|
||||
engineering: { en: 'Engineering', vi: 'Kỹ sư' },
|
||||
contact: { en: 'Contact', vi: 'Liên hệ' },
|
||||
},
|
||||
footer: {
|
||||
copyright: { en: 'All rights reserved', vi: 'Bảo lưu mọi quyền' },
|
||||
links: {
|
||||
home: { en: 'Home', vi: 'Trang chủ' },
|
||||
about: { en: 'About', vi: 'Giới thiệu' },
|
||||
projects: { en: 'Projects', vi: 'Dự án' },
|
||||
contact: { en: 'Contact', vi: 'Liên hệ' },
|
||||
},
|
||||
},
|
||||
hero: {
|
||||
greeting: { en: "Hi, I'm", vi: 'Xin chào, tôi là' },
|
||||
ctaProjects: { en: 'View Projects', vi: 'Xem dự án' },
|
||||
ctaContact: { en: 'Contact Me', vi: 'Liên hệ' },
|
||||
downloadResume: { en: 'Download Resume', vi: 'Tải CV' },
|
||||
scroll: { en: 'Scroll', vi: 'Cuộn' },
|
||||
},
|
||||
about: {
|
||||
heading: { en: 'About Me', vi: 'Giới thiệu' },
|
||||
subtitle: { en: 'Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications.', vi: 'Kỹ sư phần mềm cao cấp với chuyên môn sâu về hệ thống phân tán, công nghệ logistics và ứng dụng AI thực tiễn.' },
|
||||
engineeringTitle: { en: 'How I Think About Engineering', vi: 'Cách tôi tư duy về kỹ thuật' },
|
||||
exploringTitle: { en: "What I'm Exploring", vi: 'Những điều tôi đang tìm hiểu' },
|
||||
exploringTitlePage: { en: "What I'm Currently Exploring", vi: 'Những điều tôi đang tìm hiểu' },
|
||||
expertise: { en: 'Core Expertise', vi: 'Chuyên môn' },
|
||||
},
|
||||
expertise: {
|
||||
heading: { en: 'Core Expertise', vi: 'Chuyên môn' },
|
||||
},
|
||||
experience: {
|
||||
heading: { en: 'Experience', vi: 'Kinh nghiệm' },
|
||||
},
|
||||
projects: {
|
||||
featured: { en: 'Featured Projects', vi: 'Dự án nổi bật' },
|
||||
all: { en: 'Projects', vi: 'Dự án' },
|
||||
viewAll: { en: 'View All', vi: 'Xem tất cả' },
|
||||
viewDetails: { en: 'View Details', vi: 'Xem chi tiết' },
|
||||
categories: {
|
||||
'software-engineering': { en: 'Software Engineering', vi: 'Kỹ thuật phần mềm' },
|
||||
logistics: { en: 'Logistics', vi: 'Logistics' },
|
||||
'ai-ml': { en: 'AI / ML', vi: 'AI / ML' },
|
||||
'computer-vision': { en: 'Computer Vision', vi: 'Computer Vision' },
|
||||
architecture: { en: 'Architecture', vi: 'Kiến trúc' },
|
||||
experiment: { en: 'Experiment', vi: 'Thử nghiệm' },
|
||||
},
|
||||
},
|
||||
contact: {
|
||||
heading: { en: 'Contact', vi: 'Liên hệ' },
|
||||
email: { en: 'Email', vi: 'Email' },
|
||||
github: { en: 'GitHub', vi: 'GitHub' },
|
||||
linkedin: { en: 'LinkedIn', vi: 'LinkedIn' },
|
||||
},
|
||||
projectDetail: {
|
||||
notFound: { en: 'Project Not Found', vi: 'Không tìm thấy dự án' },
|
||||
backToProjects: { en: 'Back to Projects', vi: 'Quay lại dự án' },
|
||||
impact: { en: 'Impact', vi: 'Tác động' },
|
||||
role: { en: 'Role', vi: 'Vai trò' },
|
||||
technologies: { en: 'Technologies', vi: 'Công nghệ' },
|
||||
experiments: { en: 'Engineering Experiments', vi: 'Thí nghiệm kỹ thuật' },
|
||||
},
|
||||
engineering: {
|
||||
heading: { en: 'Engineering', vi: 'Kỹ sư' },
|
||||
categories: {
|
||||
architecture: { en: 'Architecture', vi: 'Kiến trúc' },
|
||||
ai_ml: { en: 'AI / ML', vi: 'AI / ML' },
|
||||
experiments: { en: 'Experiments', vi: 'Thử nghiệm' },
|
||||
},
|
||||
comingSoon: { en: 'Content coming soon. This section will showcase deep technical exploration in %s.', vi: 'Nội dung sắp ra mắt. Phần này sẽ giới thiệu các khám phá kỹ thuật chuyên sâu về %s.' },
|
||||
},
|
||||
common: {
|
||||
backTo: { en: 'Back to %s', vi: 'Quay lại %s' },
|
||||
skipLink: { en: 'Skip to content', vi: 'Bỏ qua nội dung' },
|
||||
resumeDownload: { en: 'Download Resume', vi: 'Tải CV' },
|
||||
socialAriaLabels: {
|
||||
github: { en: 'View GitHub profile', vi: 'Xem hồ sơ GitHub' },
|
||||
linkedin: { en: 'View LinkedIn profile', vi: 'Xem hồ sơ LinkedIn' },
|
||||
email: { en: 'Send email', vi: 'Gửi email' },
|
||||
},
|
||||
contactTag: { en: 'Contact', vi: 'Liên hệ' },
|
||||
experienceTag: { en: 'Experience', vi: 'Kinh nghiệm' },
|
||||
},
|
||||
} as const
|
||||
@@ -0,0 +1,17 @@
|
||||
import { useLanguage } from '@/hooks/useLanguage'
|
||||
|
||||
/**
|
||||
* React hook: select field by language. Must be called at component top level.
|
||||
*/
|
||||
export function useField<T>(value: T, valueEn: T | undefined): T {
|
||||
const { lang } = useLanguage()
|
||||
return lang === 'vi' ? value : (valueEn ?? value)
|
||||
}
|
||||
|
||||
/**
|
||||
* React hook: select array field by language. Must be called at component top level.
|
||||
*/
|
||||
export function useFieldArray<T>(value: T[], valueEn: T[] | undefined): T[] {
|
||||
const { lang } = useLanguage()
|
||||
return lang === 'vi' ? value : (valueEn ?? value)
|
||||
}
|
||||
Reference in new issue
Block a user