Mirrored from https://github.com/smbcloudXYZ/pepakbasajawa-web.git
Synced Oct 25, 19:15 UTC
Read-only mirror of github.com/smbcloudXYZ/pepakbasajawa-web.
copilot/add-i18n-support-for-english
copilot/add-i18n-support-for-english
dependabot/npm_and_yarn/astro-5.16.4
dependabot/npm_and_yarn/katex-0.16.27
dependabot/npm_and_yarn/prettier-3.7.4
dependabot/npm_and_yarn/tailwindcss-4.1.16
dependabot/npm_and_yarn/tailwindcss/vite-4.1.16
dependabot/npm_and_yarn/typescript-eslint-8.46.2
dependabot/npm_and_yarn/typescript-eslint/parser-8.46.2
development
main
README.md
PBJ Komplit!
Tempat belajar bahasa Jawa. / A place to learn Javanese language.
Features
- ๐ Bilingual Support: Full internationalization (i18n) with Indonesian and English
- ๐ฑ Responsive Design: Works seamlessly on all devices
- ๐จ Modern UI: Clean and intuitive interface
- ๐ SEO Optimized: Proper metadata and language alternates for better search engine visibility
Internationalization (i18n)
This site supports multiple languages:
- Indonesian (id) - Default language, accessible at
/ - English (en) - Accessible at
/en/
Language Structure
The i18n implementation includes:
Astro i18n Configuration (
astro.config.ts)- Configured routing for Indonesian (default) and English
- Default locale:
id - Supported locales:
id,en
Translation System (
src/i18n/)ui.ts- Translation dictionaries for UI stringsutils.ts- Helper functions for language detection and URL generation
Content Organization
- Indonesian content:
src/content/posts/,src/content/about/ - English content:
src/content/posts/en/,src/content/about/en/
- Indonesian content:
Language Switcher
- Located in the header for easy language switching
- Maintains the same page context when switching languages
Adding New Translations
To add translations for UI elements:
- Edit
src/i18n/ui.ts - Add the key-value pair in both
enandidsections - Use the
t()function in components to access translations
Adding Translated Content
For blog posts or pages:
- Create content in
src/content/posts/en/for English versions - Keep Indonesian versions in
src/content/posts/ - Use the same filename for both versions
Deploy on smbCloud
License
MIT