Skip navigation

Localization Resources

GNU gettext


gettext is the technology TriMet uses to manage localizations:
http://www.gnu.org/software/gettext/

and here’s the basic how-to with gettext and translations for the Pyramid framework:
http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/i18n.html#working-with-gettext-translation-files

NOTE: you don't have to use python or pyramid to use gettext ... gettext is ported to many development environs...

TriMet localizations for Spanish trip tools in .po file format


here are TriMet's trip planner localizations:
http://github.com/OpenTransitTools/view/tree/master/ott/view/locale

this is the Spanish localization file:
https://github.com/OpenTransitTools/view/blob/master/ott/view/locale/es/LC_MESSAGES/view.po

this is a mako template, and it’s an example of how new strings get into the translations:
https://github.com/OpenTransitTools/view/blob/master/ott/view/locale/misc-strings.html

NOTE: this stuff is still under development as of June 2014, and will be changing often in the near future.

OpenTripPlanner localizations in .po file format


here’s a thread discussing OTP’s new localizations:
https://groups.google.com/d/msg/opentripplanner-dev/Exd9KSXhegQ/fBcYW8Cd7N0J

here’s some code (eveloving as of June 2014, and not mainline OTP code yet):
https://github.com/buma/OpenTripPlanner/blob/po_localization/otp-leaflet-client/src/main/webapp/i18n/messages.pot

and here’s some old code specific to how OTP localized the .js clients:
https://github.com/opentripplanner/OpenTripPlanner/tree/master/src/client/js/otp/locale