preklad_io_client 0.0.1 copy "preklad_io_client: ^0.0.1" to clipboard
preklad_io_client: ^0.0.1 copied to clipboard

outdated

Dart client for Prekla.IO API translation service.

Prekla.IO API service. The package is designed to to work with translate API service https://preklad.io

Features #

It allows to translate on-demand map of key-value pair or simple text messages. Result of translation is stored in cache to reduce network requests.

Getting started #

Add preklad_io_client to your pubspec:

dependencies:
  preklad_io_client: any # or the latest version on Pub

Obtain API_KEY from Preklad.IO service (https://preklad.io).

Usage #

Configure the client:

ApiClient.initialize(
      apiKey: 'YOUR_API_KEY',
      sourceLanguage: 'en',
      targetLanguage: 'cs',
    );

Translate plain text message:

final result = await ApiClient().translateText(text);

Translate key-value pair map:

const textData = {
    'inputField': 'Enter text in English to translate',
    'button': 'Translate',
};
await ApiClient().translateData(textData)

Use trannslated data any time by key:

ApiClient().getTranslationForKey('inputField');

Run the example #

See the example/ folder for a working example app.

1
likes
0
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Dart client for Prekla.IO API translation service.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, path_provider

More

Packages that depend on preklad_io_client