inst/shiny-app/README.md

polyglotr Shiny App

This directory contains a Shiny web application that provides a user-friendly interface to the polyglotr package translation services.

Features

Running the App

Option 1: Using the helper function (recommended)

From R, after installing the polyglotr package:

library(polyglotr)
launch_polyglotr_app()

Option 2: Running directly

Navigate to this directory and run:

shiny::runApp(".")

Option 3: Using app.R

From this directory:

source("app.R")

Requirements

The following R packages are required: - shiny - shinydashboard - shinyjs - DT - polyglotr

Install missing packages with:

install.packages(c("shiny", "shinydashboard", "DT", "shinyjs"))

Usage

  1. Select Translation Service: Choose from the dropdown menu
  2. Enter Text: Type or paste text in the input area
  3. Select Languages: Choose source and target languages
  4. Detect Language (optional): Use auto-detection for source language
  5. Translate: Click the translate button to get results

API Keys

Some services require API keys: - QCRI: Register at https://mt.qcri.org/api/register

Service Information

Each translation service has different capabilities:

File Structure

Customization

The app can be customized by: - Adding more language options in server.R - Modifying the UI layout in ui.R - Adding new translation services (requires corresponding polyglotr functions) - Enhancing error handling and user feedback



Try the polyglotr package in your browser

Any scripts or data that you put into this service are public.

polyglotr documentation built on Aug. 8, 2025, 7:14 p.m.