Maintainers

Classifiers

Introduction

Inlinetrans is a django application that allows the translation of django templates from the rendered html in the browser. Once you have your templates internationalized with inlinetrans, you can click on the untranslated messages in their corresponding web pages to add their translations. This can be of great help for translators, as they will be able to translate the messages right in their intended context.

Features

A templatetag, inline_trans (or itrans), intended as a replacement for django’s trans.

A management command, inline_makemessage, intended as a replacement for django’s makemessages.

A translation bar to show translatable messages, by default visible only to staff members (you can change this behavior with the variable USER_CAN_TRANSLATE, add it in the settings)

To translate the messages in a web page rendered in your browser, you first find out, through the translation bar, which messages have already been translated (marked light green) and which ones lack translation (marked light red).

Then, you click on a marked message, and are prompted for its translation; on entering the text and clicking OK, the new translation is sent to the server and saved in the correct .po file.

Once you have translated all messages in a page, you can click on “apply changes” on the translation bar. This forces a restart on the server, and the reloading of the page with the translations applied.