Skip to content

byJim/chrome-translator-availability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Translator API Language Check

Checks language availability for Chrome's built-in Translator API, running inside a Docker environment.

Description

Generates a JSON file (out/results.json) with available translation languages grouped by source language, using the following format:

"en": [ "ar", "bg", "de", "de-AT", "es", "es-MX", "fr", "ja" ... ],

Only language pairs with "downloadable" availability are included (Chrome can download the translation model according to the available documentation).

The idea was taken from this issue.

Build and Run

Linux

docker build -t language-validation .
docker run --rm -v "$(pwd)/out:/out" language-validation

macOS Silicon

docker build --platform linux/amd64 -t language-validation .
docker run --rm --platform linux/amd64 -v "$(pwd)/out:/out" language-validation

Output is saved to the out directory in the project.

Project Structure

├── Dockerfile        # Docker image
├── run.js            # Main script
├── blank.html        # Minimal page to load the Translator API in Chrome
├── out/results.json  # Output file with results
├── languages.json    # Languages to check availability against the Translator API
└── README.md

About

Generates a JSON file with available translation languages grouped by source language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors