Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.24 KB

i18n.md

File metadata and controls

20 lines (15 loc) · 1.24 KB

Internationalization

Translations for the Wiki Ed Dashboard interface are handled through translatewiki.net.

All new interface strings — excluding the program-specific content of the assignment wizard and the training modules — should go into the config/locale/en.yml file, and documentation for those strings (describing how they are used in the interface, to aid translators) should go into the corresponding qqq.yml file. All other locale files are updated periodically via translatewiki.net.

Within Ruby code, interface strings are inserted using the Rails i18n system, with syntax within a view template like this: t("courses.course_description").

Within frontend JavaScript code, the locale data is uses to generate the I18n.js file, and strings can then be called like this: I18n.t('users.mainspace_chars').

For frontend cases where messages vary by course type — replacing student-specific language with general language for programs beyond the Wiki Educatin Wikipedia Student Program, for example — the CourseUtils.i18n function can be used. For an example, see the Details component of the course Overview.