feat: Add multi-language support (i18n)

Languages supported (8):
- English (en)
- 日本語 (ja)
- Deutsch (de)
- Français (fr)
- Español (es)
- 简体中文 (zh-CN)
- 繁體中文 (zh-TW)
- 한국어 (ko)

Changes:
- Add locale column to users table
- Add SetLocale middleware for automatic locale detection
- Add LocaleController for language switching
- Create language files with translations for all UI elements
- Add language selector to user profile page
- Update all Blade views to use translation strings
This commit is contained in:
2025-11-29 12:00:09 +09:00
parent ecfa21d56c
commit cdf0bf4bad
25 changed files with 1183 additions and 84 deletions

View File

@@ -51,7 +51,7 @@ class="w-full max-w-2xl bg-white rounded-lg shadow-2xl"
type="text"
wire:model.live="search"
class="w-full pl-10 pr-4 py-3 border-0 focus:ring-0 text-lg"
placeholder="Search documents..."
placeholder="{{ __('messages.quick_switcher.placeholder') }}"
autocomplete="off"
>
</div>
@@ -61,7 +61,7 @@ class="w-full pl-10 pr-4 py-3 border-0 focus:ring-0 text-lg"
<div class="max-h-96 overflow-y-auto">
@if(empty($this->results))
<div class="p-8 text-center text-gray-500">
No documents found
{{ __('messages.quick_switcher.no_results') }}
</div>
@else
<ul class="divide-y divide-gray-200">
@@ -109,15 +109,15 @@ class="block px-4 py-3 hover:bg-gray-50 transition {{ $index === $selectedIndex
<span class="flex items-center">
<kbd class="px-2 py-1 bg-white border border-gray-300 rounded text-xs font-semibold mr-1"></kbd>
<kbd class="px-2 py-1 bg-white border border-gray-300 rounded text-xs font-semibold mr-2"></kbd>
to navigate
{{ __('messages.quick_switcher.navigate') }}
</span>
<span class="flex items-center">
<kbd class="px-2 py-1 bg-white border border-gray-300 rounded text-xs font-semibold mr-2"></kbd>
to select
{{ __('messages.quick_switcher.select') }}
</span>
<span class="flex items-center">
<kbd class="px-2 py-1 bg-white border border-gray-300 rounded text-xs font-semibold mr-2">esc</kbd>
to close
{{ __('messages.quick_switcher.close') }}
</span>
</div>
</div>