Closed (fixed)
Project:
Shadowbox
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Jun 2008 at 17:20 UTC
Updated:
23 Jun 2008 at 15:05 UTC
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
}
}
Comments
Comment #1
psynaptic commentedHi there, thanks a lot for pointing this out. I will add the changes today.
Comment #2
davyvdb commentedExcellent service!
Comment #3
psynaptic commentedThis has now been committed to the DRUPAL-5 branch.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.