This directory contains a Shiny web application that provides a user-friendly interface to the polyglotr
package translation services.
From R, after installing the polyglotr
package:
library(polyglotr)
launch_polyglotr_app()
Navigate to this directory and run:
shiny::runApp(".")
From this directory:
source("app.R")
The following R packages are required:
- shiny
- shinydashboard
- shinyjs
- DT
- polyglotr
Install missing packages with:
install.packages(c("shiny", "shinydashboard", "DT", "shinyjs"))
Some services require API keys: - QCRI: Register at https://mt.qcri.org/api/register
Each translation service has different capabilities:
app.R
- Main application entry pointui.R
- User interface definitionserver.R
- Server logic and translation handlingREADME.md
- This fileThe 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
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.