Skip to content

Translate strings from a CSV file. For Python 3.

Notifications You must be signed in to change notification settings

anthropedia/csv-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translation Library with CSV

Translate a content from a CSV translation files.

Example

CSV files format

CSV files can have this format and should be UTF-8 encoded.

my-translations-file.csv:

TCI title,Titre ITC
"yes, or no","oui, ou non"
Welcome %(user)s!,Bienvenue %(user)s !

Usage

from csvi18n import Translator

translator = Translator('my-translations-file.csv')
translator.translate('TCI title')  # => Titre ITC

Run tests

python3 -m unittest

Releases

No releases published

Packages

No packages published

Languages