Translate shadowbox
Davy Van Den Bremt - June 7, 2008 - 17:20
| Project: | Shadowbox |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | psynaptic |
| Status: | closed |
Jump to:
Description
Hi, can you add the ability to translate the interface to this module? It's fairly simple. You can just add the following code to the settings:
'cancel' => t('Cancel'),
'loading' => t('Loading'),
'close' => t('Close'),
'next' => t('Next'),
'previous' => t('Previous'),
'errors_single' => t('You must install the <a href="{0}">{1}</a> browser plugin to view this content.'),
'errors_shared' => t('You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.'),
'errors_either' => t('You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.')and read these settings out in the shadowbox.js file by doing:
text: {
cancel: Drupal.settings.shadowbox.cancel,
loading: Drupal.settings.shadowbox.loading,
close: Drupal.settings.shadowbox.close,
next: Drupal.settings.shadowbox.next,
prev: Drupal.settings.shadowbox.previous,
errors: {
single: Drupal.settings.shadowbox.errors_single,
shared: Drupal.settings.shadowbox.errors_shared,
either: Drupal.settings.shadowbox.errors_either
}
}
#1
Hi there, thanks a lot for pointing this out. I will add the changes today.
#2
Excellent service!
#3
This has now been committed to the DRUPAL-5 branch.
#4
Automatically closed -- issue fixed for two weeks with no activity.