Code Monkey home page Code Monkey logo

opentranslate's Introduction

OpenTranslate

Prerequisites:

Installation:

  1. Clone the repository: git clone https://github.com/amrgaber/OpenTranslate.git
  2. Install dependencies: pip install -r requirements.txt (if a requirements file exists)

Usage:

  1. Run the script from the command line:

Bash

python [script-name].py -p <source_file> -l <target_language> [options]

  1. Replace <source_file> with the path to your source PO file (relative or absolute).

  2. Replace <target_language> with the desired language code (e.g., ar, fr).

  3. Use optional arguments for customization:

    • -d: Destination directory for the translated file (defaults to source directory).
    • -c: Create destination directory if it doesn't exist.
    • -o: Output filename format (default: <base_name>_<date>_<time>.po).

Example:

Bash

python translate_po.py -p my_translation.po -l ar -d localized_files

This translates my_translations.po into Arabic and saves the file as my_translations_2402_200000.po in the localized_files directory (if it exists, otherwise it's created).

opentranslate's People

Contributors

amrgaber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.