Add comprehensive i18n localization for KMM and iOS

KMM (Android/Shared):
- Add strings.xml with 200+ localized strings
- Add translation files for es, fr, de, pt languages
- Update all screens to use stringResource() for i18n
- Add Accept-Language header to API client for all platforms

iOS:
- Add L10n.swift helper with type-safe string accessors
- Add Localizable.xcstrings with translations for all 5 languages
- Update all SwiftUI views to use L10n.* for localized strings
- Localize Auth, Residence, Task, Contractor, Document, and Profile views

Supported languages: English, Spanish, French, German, Portuguese

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-02 02:02:00 -06:00
parent e62e7d4371
commit c726320c1e
59 changed files with 19839 additions and 757 deletions

View File

@@ -1,14 +1,20 @@
package com.casera.shared.network
package com.example.casera.network
import io.ktor.client.*
import io.ktor.client.engine.js.*
import io.ktor.client.plugins.*
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.client.plugins.logging.*
import io.ktor.serialization.kotlinx.json.*
import kotlinx.browser.window
import kotlinx.serialization.json.Json
actual fun getLocalhostAddress(): String = "127.0.0.1"
actual fun getDeviceLanguage(): String {
return window.navigator.language.split("-").firstOrNull() ?: "en"
}
actual fun createHttpClient(): HttpClient {
return HttpClient(Js) {
install(ContentNegotiation) {
@@ -23,5 +29,9 @@ actual fun createHttpClient(): HttpClient {
logger = Logger.DEFAULT
level = LogLevel.ALL
}
install(DefaultRequest) {
headers.append("Accept-Language", getDeviceLanguage())
}
}
}