Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make $translation_adapter public so it can be used by custom modules to add their own translations #80

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions library/WT/I18N.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class WT_I18N {
public static $locale;
public static $collation;
public static $list_separator;
public static $translation_adapter;
private static $dir;
private static $cache;
private static $numbering_system;
private static $translation_adapter;

// Initialise the translation adapter with a locale setting.
// If null is passed, work out which language is needed from the environment.
Expand Down Expand Up @@ -132,9 +132,6 @@ function($x) { return strtoupper($x[0]); },
// Load the translation file
self::$translation_adapter = new Zend_Translate('gettext', WT_ROOT.'language/'.$locale.'.mo', $locale);

// Deprecated - some custom modules use this to add translations
Zend_Registry::set('Zend_Translate', self::$translation_adapter);

// Load any local user translations
if (is_dir(WT_DATA_DIR.'language')) {
if (file_exists(WT_DATA_DIR.'language/'.$locale.'.mo')) {
Expand Down