Navigation
Academic Area Reservations
Academic Areas
Academic Classifications
Academic Sessions
Add Academic Session
Add Application Setting
Add Building
Add Course Credit Type
Add Course Credit Unit
Add Course Offering
Add Course Type
Add Curriculum
Add Date Pattern
Add Default Manager Setting
Add Department
Add Designator
Add Distribution Preference
Add Event
Add Event Date Mapping
Add Event Info
Add Event Meetings
Add Examination
Add Examination Distribution Preference
Add Examination Period
Add Examination Type
Add Instructional Type
Add Instructor
Add Instructor Attribute
Add Instructor Attribute Type
Add Instructor Role
Add Logging Level
Add Non-University Location
Add Position Type
Add Reservation
Add Role
Add Room
Add Room Feature
Add Room Feature Type
Add Room Group
Add Room Type
Add Solver Configuration
Add Solver Group
Add Solver Parameter
Add Solver Parameter Group
Add Special Use Room
Add Sponsoring Organization
Add Standard Event Note
Add Status Type
Add Student Accommodation
Add Student Group
Add Student Scheduling Status Type
Add Subject Area
Add Teaching Responsibility
Add Time Pattern
Add Timetable Manager
Add User
Administration Reports
Alternatives for Class
Application Configuration
Application Of Preferences
Application.properties
Assign Instructors
Assigned Classes
Assigned Examinations
Assigned Teaching Requests
Assignment History
Attachment Types
Banner Academic Sessions
Banner Message Responses
Banner Offering Detail
Banner Offering Edit
Banner Offerings
Banner Term CRN Properties
Bugs
Buildings
CAS Authentication
CPSolver
Chameleon
Change Log for Student
Change Message for Student
Changes
Class Assignment
Class Assignment Properties
Class Assignments
Class Detail
Class Duration Types
Class Schedule
Class Timetable
Classes
Classes for Student
Conflict-Based Statistics
Constraint Solver Howto
Contact Us
Course Credit
Course Credit Formats
Course Credit Types
Course Credit Units
Course Finder
Course Reports
Course Reservations
Course Timetabling Solver
Course Timetabling Solver Log
Course Types
Credits
Current User
Curricula
Curriculum Detail
Curriculum Projection Rules
Curriculum Requested Enrollments
Curriculum Schedule
Curriculum Timetable
Custom Room Availability
Customizations
Data Exchange
Date Patterns
Default Academic Session
Default Manager Settings
Departmental Schedule
Departmental Timetable
Departments
Designator List
Distribution Preferences
Distribution Types
Eclipse
Edit Academic Session
Edit Application Setting
Edit Building
Edit Class
Edit Course Credit Format
Edit Course Credit Formats
Edit Course Credit Type
Edit Course Credit Types
Edit Course Credit Unit
Edit Course Credit Units
Edit Course Offering
Edit Course Type
Edit Course Types
Edit Curriculum
Edit Date Pattern
Edit Default Manager Setting
Edit Department
Edit Designator
Edit Distribution Preference
Edit Distribution Type
Edit Event
Edit Event Date Mapping
Edit Event Date Mappings
Edit Event Status
Edit Event Statuses
Edit Examination
Edit Examination Distribution Preference
Edit Examination Period
Edit Examination Type
Edit Examination Types
Edit Instructional Type
Edit Instructor
Edit Instructor Attribute
Edit Instructor Attribute Type
Edit Instructor Attribute Types
Edit Instructor Role
Edit Instructor Roles
Edit Logging Level
Edit Logging Levels
Edit Manager Setting
Edit Offering Consent Type
Edit Offering Consent Types
Edit Permission
Edit Permissions
Edit Point In Time Data Snapshot
Edit Point In Time Data Snapshots
Edit Position Type
Edit Position Types
Edit Reservation
Edit Role
Edit Roles
Edit Room
Edit Room Availability
Edit Room Departments
Edit Room Event Availability
Edit Room Feature
Edit Room Feature Type
Edit Room Feature Types
Edit Room Features
Edit Room Group
Edit Room Groups
Edit Room Preference
Edit Room Type
Edit Scheduling Subpart
Edit Solver Configuration
Edit Solver Group
Edit Solver Parameter
Edit Solver Parameter Group
Edit Sponsoring Organization
Edit Standard Event Note
Edit Status Type
Edit Student Accommodation
Edit Student Accommodations
Edit Student Group
Edit Student Groups
Edit Student Scheduling Status Type
Edit Student Scheduling Status Types
Edit Subject Area
Edit Teaching Responsibilities
Edit Teaching Responsibility
Edit Time Pattern
Edit Timetable Manager
Edit User
Email
Enrollment Audit PDF Reports
Enrollments of Class or Course
Event Date Mappings
Event Detail
Event Reports
Event Room Availability
Event Room Selection
Event Schedule
Event Service Providers
Event Statuses
Event Timetable
Events
Exact Time Pattern
Exam Naming Convention
Exam Timetable
Examination Assignment
Examination Assignment Changes
Examination Conflict-Based Statistics
Examination Detail
Examination Distribution Preferences
Examination PDF Reports
Examination Periods
Examination Reports
Examination Schedule
Examination Solution Properties
Examination Solver
Examination Solver Log
Examination Solver Status
Examination Statuses
Examination Timetable
Examination Timetabling
Examination Types
Examinations
Exporting Solver XML
Frequently Asked Questions
Hibernate Statistics
Instructional Methods
Instructional Offering Configuration
Instructional Offering Cross Lists
Instructional Offering Detail
Instructional Offerings
Instructional Types
Instructor Assignment Preferences
Instructor Attribute Types
Instructor Attributes
Instructor Detail
Instructor Preferences
Instructor Roles
Instructor Scheduling
Instructor Scheduling Solver
Instructor Scheduling Solver Log
Instructors
LDAP Authentication / Lookup
Last Changes
Limit and Projection Snapshot
Localization
Logging Levels
Lookup Classes
Lookup Examinations
Main Page
Majors
Manage Instructor List
Manage Solvers
Manager Settings
Mass cancel...
Meetings
Minors
Multiple Class Setup
Not-Assigned Classes
Not-Assigned Examinations
Not-Assigned Teaching Requests
Offering Consent Types
Online Student Scheduling Dashboard
Page Statistics
People
People Lookup
Permissions
Personal Examination Schedule
Personal Schedule
Personal Timetable
Point In Time Data Reports
Point In Time Data Snapshots
Position Types
Reservations
Roles
Roll Forward Banner Session
Roll Forward Session
Room Availability
Room Detail
Room Feature Types
Room Features
Room Groups
Room Schedule
Room Timetable
Room Types
Rooms
SVN
Saved Timetables
Scheduling Subpart Detail
Scripts
Select Academic Session
Select User Role
Send email...
Setup Examination Periods
Setup Teaching Requests
Solution Properties
Solution Reports
Solver
Solver Configurations
Solver Groups
Solver Load Balancing
Solver Log
Solver Parameter Groups
Solver Parameters
Solver Status
Solver Warnings
Sponsoring Organizations
Standard Event Notes
Status Types
Structure of Distribution Preferences
Student Accommodations
Student Conflicts
Student Course Requests
Student Groups
Student Scheduling Assistant
Student Scheduling Status Types
Student Sectioning Dashboard
Student Sectioning Reports
Student Sectioning Solution Properties
Student Sectioning Solver
Student Sectioning Solver Log
Subject Areas
Subject Schedule
Subject Timetable
Suggestions
Teaching Assignment Changes
Teaching Assignment Detail
Teaching Assignments
Teaching Request Detail
Teaching Responsibilities
Test HQL
Time Patterns
Timetable
Timetable Managers
Timetables
Timetabling
Timetabling Benchmarks
Timetabling CVS Access
Timetabling Development using MyEclipse
Timetabling Development using NetBeans
Timetabling Installation FAQ
Tips and Tricks
Types of Distribution Preferences
UniTime 4.1 Online Documentation
UniTime 4.2 Online Documentation
UniTime Installation
Update Meetings
Users (Database Authentication)
 

Localization

Language settings


unitime.locale=en

For a particular http session, the locale can be also changed using the locale parameter, e.g., see our online demo in Czech: http://demo.unitime.org/UniTime?locale=cs. Please note that only some portions of the application were made localizable (and have Czech translations) so far.

It is also possible to tell the application to take the language settings from the browser. This is done in the LocaleFilter, when the use-browser-settings parameter is set to true (e.g., by web.xml)

Most of the UniTime application was written using Apache Struts, however, new pages and components (and in future the whole user interface) are written using Google Web Toolkit (GWT). For localization of GWT parts we use its i18n capabilities.

In short, all text messages are put into a Messages interface (e.g., see StudentSectioningMessages) which is then used by calling these methods on a class created calling GWT.create(message interface), e.g., see this widget. Note that this only works in the client code (the code that gets compiled into JavaScript), however, for the server side we have created a very similar approach so that the created Messages interfaces can be reused as we move more towards GWT in the future. We use this technique for both server side of the GWT-based pages and components as well as for the old Struts-based pages and JSPs. For server-side Java code (e.g., Struts forms and actions), the only difference is that the Messages class is instantiated using Localization class (e.g., see here). In Java Server Pages (JSP) files, we have two tags <loc:bundle/> and <loc:message/> that are providing the localized strings (e.g., see here, the tags are defined here).

<%@ taglib uri="/WEB-INF/tld/localization.tld" prefix="loc" %> <loc:bundle name="CourseMessages"> <%-- translated message, using loc:message, e.g., titleRemoveRoomPreferences=Remove Room Preferences --> <loc:message name="titleRemoveRoomPreference"/> <%-- translated message with one argument, e.g., labelConfiguration=Configuration {0}) -->   <loc:message name="labelConfiguration"><bean:write property='configName'/></loc:message> <%-- translated message, using MSG property --> <%=MSG.confirmRoomSizeDifferentFromCapacity()%> <%-- additional message bundle --> <loc:bundle name="ConstantsMessages" id="CONST"> <loc:messsage name="monday" id="CONST"/> <%=MSG.sunday()%> </loc:bundle> </loc:bundle>
An example of using localization tags in a JSP file


protected final static CourseMessages MSG = Localization.create(CourseMessages.class); ... // Throw a localized exception if the user is not logged in if (!Web.isLoggedIn(request.getSession())) throw new Exception(MSG.exceptionAccessDenied()); // Localized message MSG.listInstructors(department.getDeptCode(), department.getName())
An example of using localization in a Java file


public static final StudentSectioningMessages MESSAGES = GWT.create(StudentSectioningMessages.class); // Localized button // buttonRequests=<u>R</u>equests iRequests = new Button(MESSAGES.buttonRequests()); // Localized message with multiple arguments // backToBackDistance=Distance to travel from {0} is approx. {1} minutes. MESSAGES.backToBackDistance(clazz.getBackToBackRoom(), clazz.getBackToBackDistance()
An example of using localization in a GWT client code

Here is an example of a change localizing a particular page. The default messages are in English, the language-dependent messages are in a property file with the same name (plus identification of the language using two character iso language code), e.g., see Czech translation of CourseMessages

Also, please take a look at classes ExportMessages and ImportMessages that can be used to convert existing messages to a CSV file and back -- the file can be easily edited in Excel (or Google Docs) -- it has three columns: message name, English (default) variant and localized variant. One of the first steps could be translating these course messages to your language and trying to plug them in.

Course Messages Localization Example

Example of the localization files in Google Docs.

Note that the language has to be added in the UniTime.gwt.xml (as a supported language, extending locale property) for the GWT compiler to create the appropriate language mutation.

Zanata

A project has been created at zanata.org to support the cooperation of users on the translation of UniTime to other languages. Please note that if you want your translation to be a part of the standard distribution of UniTime, you need to sign a contributor license agreement for Apereo.

With Zanata, you translate all the messages at https://translate.zanata.org/zanata/iteration/view/unitime/4.2. To test the translation in your version of UniTime, you will need to
  1. Have a local clone of the UniTime repository (git clone https://github.com/UniTime/unitime.git)
  2. In Zanata, under User Settings > Client, generate an API key (if you have not done so) and copy your Configuration (zanata.ini) to ~/.config/zanata.ini
  3. Download translations from Zanata either using
    • Zanata client
      1. Install a Zanata client on your computer (see http://zanata-client.readthedocs.org for more details)
      2. Pull the translation from the project (e.g., by calling zanata-cli pull in your local UniTime repository). This should download the translation files under Documentation/Translations.
    • or using Maven (zanata:pull task)
      1. Pull the translation from the project (e.g., by calling mvn zanata:pull in your local UniTime repository). This should download the translation files under Documentation/Translations.
  4. Import translation by using Apache Ant, import-translations task (ant -Dlocale=cs import-translations), which will populate the above-mentioned files with messages with the translations from Zanata for the given locale.
  5. Build UniTime (using either ant build  or mvn package) 

Note that if you are importing a new language, you will need to include the two character language code in the UniTime.gwt.xml (extending locale property). 

Notes

If you want to help with translation to another language, please consider looking at the English dictionary, which contains terminology used in UniTime in the original English version. It is advisable to start by translating these terms first, then fill in the translation of particular messages (in Zanata or elsewhere).


Updated on May 18, 2017 by Tomáš Müller (Version 2)