|Table of Contents|
How do I localize my site?
See this documentation: Guidelines for Translating the Open edX Platform
How do I add localization support to my project?
See this wiki page: How to add localization support
How do I write code that can be localized?
See the guidelines here: Internationalization Coding Guidelines
Who is responsible for which translation resource?
I'm seeing a KeyError when using my local translations
Localizable strings often include placeholder variable names that must be included precisely in each translation. If by mistake a placeholder name is misspelled, then you will see an error something like this:
Traceback (most recent call last): File "/edx/app/edxapp/edx-platform/common/djangoapps/util/views.py", line 87, in inner return func(request, *args, **kwargs) File "/edx/app/edxapp/edx-platform/lms/djangoapps/certificates/views/webview.py", line 574, in render_html_view _update_certificate_context(context, user_certificate, platform_name) File "/edx/app/edxapp/edx-platform/lms/djangoapps/certificates/views/webview.py", line 111, in _update_certificate_context course_number=context['course_number'] KeyError: u'username'
In this example, the code was expecting to provide a variable called ``user_name`` but the translation accidentally switched it to ``username``. Unfortunately the error message does not make clear what the problem is, but the solution is to correct the translation that has the incorrect placeholder.
See the following for more details:
Search here for answers to localization questions:
Want to add an answer? Great, here's how: How to add an Answer.
|Content by Label|