aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-08-04 02:00:26 +0200
committerSem <sembrestels@riseup.net>2012-08-04 02:00:26 +0200
commitf95095e9cd347e1d64ecd8919d19acc9adeda3fe (patch)
tree0dfca8cf85dd5ca3f1001af7c6b7aa66dcbe38da
parent454eef0037445af1657641c656eca55914ea345d (diff)
downloadelgg-f95095e9cd347e1d64ecd8919d19acc9adeda3fe.tar.gz
elgg-f95095e9cd347e1d64ecd8919d19acc9adeda3fe.tar.bz2
Internationalized colorbox.
-rw-r--r--languages/ca.php11
-rw-r--r--languages/en.php11
-rw-r--r--languages/es.php11
-rw-r--r--views/default/js/lightbox.php10
4 files changed, 43 insertions, 0 deletions
diff --git a/languages/ca.php b/languages/ca.php
new file mode 100644
index 000000000..882ef9df4
--- /dev/null
+++ b/languages/ca.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Colorbox language strings
+ *
+ */
+
+$catalan = array(
+ "js:lightbox:current" => "imatge %s de %s",
+);
+
+add_translation("ca", $catalan);
diff --git a/languages/en.php b/languages/en.php
new file mode 100644
index 000000000..a585ca9b5
--- /dev/null
+++ b/languages/en.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Colorbox language strings
+ *
+ */
+
+$english = array(
+ "js:lightbox:current" => "image %s of %s",
+);
+
+add_translation("en", $english);
diff --git a/languages/es.php b/languages/es.php
new file mode 100644
index 000000000..baeea98e4
--- /dev/null
+++ b/languages/es.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Colorbox language strings
+ *
+ */
+
+$spanish = array(
+ "js:lightbox:current" => "imagen %s de %s",
+);
+
+add_translation("es", $spanish);
diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php
index 6e910f635..014a33196 100644
--- a/views/default/js/lightbox.php
+++ b/views/default/js/lightbox.php
@@ -25,6 +25,16 @@
elgg.provide('elgg.ui.lightbox');
elgg.ui.lightbox.init = function() {
+
+ $.extend($.colorbox.settings, {
+ current: elgg.echo('js:lightbox:current', ['{current}', '{total}']),
+ previous: elgg.echo('previous'),
+ next: elgg.echo('next'),
+ close: elgg.echo('close'),
+ xhrError: elgg.echo('error:default'),
+ imgError: elgg.echo('error:default'),
+ });
+
$(".elgg-lightbox").colorbox();
$(".elgg-lightbox-photo").colorbox({photo: true});
var n = 0;