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:
@@ -14,7 +14,7 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path>
|
||||
</svg>
|
||||
Edit
|
||||
{{ __('messages.documents.edit') }}
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
@@ -22,12 +22,12 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
|
||||
<div class="flex items-center text-sm text-gray-500 space-x-4">
|
||||
@if($document->created_by)
|
||||
<span>
|
||||
Created by {{ $document->creator->name }}
|
||||
{{ __('messages.documents.created_by') }} {{ $document->creator->name }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<span>
|
||||
Updated {{ $document->updated_at->diffForHumans() }}
|
||||
{{ __('messages.documents.updated') }} {{ $document->updated_at->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
|
||||
@if(count($backlinks) > 0)
|
||||
<div class="border-t border-gray-200 pt-8">
|
||||
<h2 class="text-xl font-semibold text-gray-900 mb-4">
|
||||
Linked References
|
||||
{{ __('messages.documents.linked_references') }}
|
||||
</h2>
|
||||
|
||||
<div class="space-y-3">
|
||||
@@ -69,11 +69,11 @@ class="block p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition"
|
||||
<div class="mt-12 pt-8 border-t border-gray-200">
|
||||
<div class="grid grid-cols-2 gap-4 text-sm text-gray-500">
|
||||
<div>
|
||||
<span class="font-medium">Path:</span>
|
||||
<span class="font-medium">{{ __('messages.documents.path') }}:</span>
|
||||
<code class="ml-2 text-xs bg-gray-100 px-2 py-1 rounded">{{ $document->path }}</code>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium">Last modified:</span>
|
||||
<span class="font-medium">{{ __('messages.documents.last_modified') }}:</span>
|
||||
<span class="ml-2">{{ $document->updated_at->format('Y-m-d H:i:s') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user