Skip to content

Add translation support #103

@JackMorganNZ

Description

@JackMorganNZ

Overview

The CS Unplugged website should handle translations (see Django guide on translation).

Details

Online system for community translations

I have already narrowed it down to two systems for easily managing translations:

Research will be required to pick the best system to use.

Types of content to translate

There is two types of text that needs to be translated:

  1. System strings: Text that is used in HTML templates, resources, etc. The translation files (.po and .mo) can be automatically generated and retrieved by Django.
  2. Content strings: Text found in files in the topics/content folder (within Markdown files).

The second type of text requires some thought on how to easily translate this material. Two possible solutions that are worth investigating (could be many more):

  1. Each language has it's own folder within the topics/content/ folder. This was our initial approach, and Add locale property to models, reading of translated data in load scripts, and retrieving of models based off locale #47 was to implement locale property on models, reading of translated data in load scripts, and retrieving of models based off locale. Downsides include:

    • Custom tracking of how updated a file is.

    • Translations would be inputted on two systems (Crowdin/Transifex and Github).

  2. Create script that creates message files from content files (see Django docs and Babel). This would allow all content to be translated in the one place. Would need to research if message files are generated before or after Verto translation. Downsides include:

    • May be difficult to parse translatable strings (this may need to be a feature within Verto).

Summary

This issue will require:

  • Decision on translation system.
  • Configuring of Django settings regarding internationalization.
  • Adding documentation.
  • Allowing manual changing of language on website.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions