SwiftTranslate

1.0

Easy to use Swift language translation
itsliamdowd/SwiftTranslate

What's New

1.0 Initial Release

2023-07-03T22:08:53Z

Initial release of Swift Translate!

SwiftTranslate

It just works! Easy to use Swift Translation. No API Key required!

Setup

Example

import Foundation

// Example function that demonstrates the usage of SwiftTranslate struct
func translateExample() {
    let sourceText = "Hello world!"
    let sourceLanguage = "en"
    let targetLanguage = "fr"

    let translatedText = try SwiftTranslate.translateText(text: sourceText, sourceLanguage: sourceLanguage, targetLanguage: targetLanguage)
    print("Source Text: \(sourceText)")
    print("Translated Text: \(translatedText)")
}

// Call the example function
translateExample()

Languages Supported

  • Arabic: ar
  • Azerbaijani: az
  • Chinese: zh
  • Czech: cs
  • Danish: da
  • Dutch: nl
  • English: en
  • Esperanto: eo
  • Finnish: fi
  • French: fr
  • German: de
  • Greek: el
  • Hebrew: he
  • Hindi: hi
  • Hungarian: hu
  • Indonesian: id
  • Irish: ga
  • Italian: it
  • Japanese: ja
  • Kabyle: kab
  • Korean: ko
  • Occitan: oc
  • Persian: fa
  • Polish: pl
  • Portuguese: pt
  • Russian: ru
  • Slovak: sk
  • Spanish: es
  • Swedish: sv
  • Turkish: tr
  • Ukrainian: uk
  • Vietnamese: vi

Acknowledgement

Swift Translate is based off of LibreTranslate. Thanks for making this package possible! https://github.com/LibreTranslate/LibreTranslate

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 12:19:24 GMT-0900 (Hawaii-Aleutian Daylight Time)