preklad_io_client

Creator: coderz1093

Last updated:

0 purchases

preklad_io_client Image
preklad_io_client Images
Add to Cart

Description:

preklad io client

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
copied to clipboard
Obtain API_KEY from Preklad.IO service (https://preklad.io).
Usage #
Configure the client:
ApiClient.initialize(
apiKey: 'YOUR_API_KEY',
sourceLanguage: 'en',
targetLanguage: 'cs',
);
copied to clipboard
Translate plain text message:
final result = await ApiClient().translateText(text);
copied to clipboard
Translate key-value pair map:
const textData = {
'inputField': 'Enter text in English to translate',
'button': 'Translate',
};
await ApiClient().translateData(textData)
copied to clipboard
Use trannslated data any time by key:
ApiClient().getTranslationForKey('inputField');
copied to clipboard
Run the example #
See the example/ folder for a working example app.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.