From 08f7f4c28c411dce90ebb608cadad3192b14915b Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 2 Aug 2012 18:07:06 -0300 Subject: Setting language of the timeline --- timelinejs.module | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/timelinejs.module b/timelinejs.module index 9147b16..48899bb 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -54,7 +54,7 @@ function timelinejs_theme($existing, $type, $theme, $path) { 'hash_bookmark' => 'true', 'css' => NULL, 'js' => '/sites/all/libraries/timelinejs/compiled/js/timeline.js', - 'lang' => '/sites/all/libraries/timelinejs/compiled/js/locale/pt-br.js', + 'lang' => NULL, ), ), 'timelinejs_json' => array( @@ -123,10 +123,13 @@ function timelinejs_json($nid) { * Menu callback. */ function timelinejs($nid) { + global $language; + return theme('timelinejs', array( 'width' => '960px', 'height' => '500px', 'source' => '/timelinejs/json/'. (int) $nid, - 'css' => '/sites/boletim/themes/boletimclean/timeline.css' + 'css' => '/sites/boletim/themes/boletimclean/timeline.css', + 'lang' => '/sites/all/libraries/timelinejs/compiled/js/locale/'. $language->language .'.js', )); } -- cgit v1.2.3