SwiftBindings.Apple.Translation
26.2.16
dotnet add package SwiftBindings.Apple.Translation --version 26.2.16
NuGet\Install-Package SwiftBindings.Apple.Translation -Version 26.2.16
<PackageReference Include="SwiftBindings.Apple.Translation" Version="26.2.16" />
<PackageVersion Include="SwiftBindings.Apple.Translation" Version="26.2.16" />
<PackageReference Include="SwiftBindings.Apple.Translation" />
paket add SwiftBindings.Apple.Translation --version 26.2.16
#r "nuget: SwiftBindings.Apple.Translation, 26.2.16"
#:package SwiftBindings.Apple.Translation@26.2.16
#addin nuget:?package=SwiftBindings.Apple.Translation&version=26.2.16
#tool nuget:?package=SwiftBindings.Apple.Translation&version=26.2.16
SwiftBindings.Apple.Translation
Native .NET bindings for Apple's Translation framework — on-device language translation and language-availability queries. These are not Objective-C proxy wrappers; they use .NET 10's native Swift interop for direct, high-performance calls into Swift APIs from C#.
📖 Full usage guide → — requests/responses, sessions, batch translation, language availability, and error handling, with the exact C# names emitted by the generator.
Installation
dotnet add package SwiftBindings.Apple.Translation
Requirements
- .NET 10.0+
- Target framework:
net10.0-ios26.2or higher. The package is compiled against the iOS 26.2 SDK supplement, so your app's<TargetFramework>platform version must be ≥ 26.2 to restore it — an explicit lower TPV (e.g.net10.0-ios18.0) or a barenet10.0-ioswhose installed workload defaults below 26.2 fails restore withNU1202. This is the compile-SDK pin, not your app's deployment minimum. - Deployment minimum is separate — set your app's real minimum OS with
<SupportedOSPlatformVersion>(independent of the TFM above). Individual APIs that need a newer OS at runtime are gated by generated[SupportedOSPlatform]attributes; the C# compiler flags a call that isn't valid for your target. - macOS host for development
Usage
using Translation;
// Translate a single string
var request = new TranslationSession.Request("Hello, world!");
var sourceText = request.SourceText; // "Hello, world!"
var clientId = request.ClientIdentifier; // optional correlation id
// Inspect availability metadata
var availability = new LanguageAvailability();
// Errors
var error = TranslationError.UnsupportedLanguagePairing;
var description = error.ErrorDescription;
var reason = error.FailureReason;
TranslationSession, LanguageAvailability, and the TranslationError cases are all bound; the Swift-side TranslationSession is driven by the SwiftUI .translationTask modifier — refer to Apple's documentation for the full request/response lifecycle.
Documentation
- Usage guide (wiki) — full C# walkthrough of the binding surface
- Apple Translation framework
How It Works
These bindings are auto-generated by Swift Dotnet Bindings using .NET 10's native Swift interop via the SwiftBindings SDK.
License
The bindings are MIT licensed. Translation is part of the Apple SDK; refer to Apple's licensing for the underlying framework.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-ios26.2 is compatible. |
-
net10.0-ios26.2
- SwiftBindings.Apple (>= 26.2.9)
- SwiftBindings.Runtime (>= 0.20.2 && < 0.21.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.