translate static method

String translate(
  1. String text,
  2. String fromCode,
  3. String toCode
)

Translates text from one language to another.

text - The text to translate. fromCode - The source language code (e.g., 'en' for English). toCode - The target language code (e.g., 'ar' for Arabic).

Returns the translated text as a String.

Implementation

static String translate(String text, String fromCode, String toCode) {
  return _bindings.translate(text, fromCode, toCode);
}