Skip to content

URLRoutingTranslating 0.0.1

Latest

Choose a tag to compare

@coenttb coenttb released this 26 Jul 19:53

Initial release of URLRoutingTranslating - seamless integration of multilingual string support with URL routing.

Features

  • 🌍 Multi-language URL support: Parse and generate URLs in multiple languages
  • 🔧 Type-safe routing: Full Swift type safety with compile-time route validation
  • 📊 Performance optimized: ~300k parsing operations per second
  • 🐛 Helpful debugging: Rich error messages and debugging utilities
  • Swift 6.0 compatible with iOS 17+ and macOS 14+ support

Installation

Swift Package Manager

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/coenttb/swift-url-routing-translating.git", from: "0.0.1")
],
targets: [
    .target(
        name: "YourTarget",
        dependencies: [
            .product(name: "URLRoutingTranslating", package: "swift-url-routing-translating")
        ]
    )
]

Quick Start

import Translating
import URLRoutingTranslating

extension TranslatedString {
    static let home: TranslatedString = [
        .english: "home",
        .dutch: "thuis"
    ]
}

// Parse URLs in any language
try router.match(path: "/home")   // → .home
try router.match(path: "/thuis")  // → .home