Closed (fixed)
Project:
Matrix field
Version:
7.x-2.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2009 at 14:11 UTC
Updated:
4 Aug 2015 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
torsti commentedI need this info also! I tried this:
but it didn't work.
Comment #2
maijs commentedAny solution to this problem? Can column and row labels be translated?
Comment #3
levacjeep commentedOn line 398 of matrix.module
Change to:
Comment #4
mdubnz commentedI'm in need of a solution that works for version 1.4
It appears you solution is for a later version levacjeep
Any help appreciated..
Cheers
Comment #5
perceptum commentedHere is the git diff for our solution to this problem
git diff matrix.module
diff --git a/sites/all/modules/matrix/matrix.module b/sites/all/modules/matrix/matrix.module
index 951cca4..4d9bea4 100644
--- a/sites/all/modules/matrix/matrix.module
+++ b/sites/all/modules/matrix/matrix.module
@@ -286,6 +286,11 @@ function theme_matrix_formatter_default($element) {
$header = $field_info['cols_header'];
array_unshift($header, '');
+ // Translatable headers - PERCEPTUM
+ foreach($header as $i => $h) {
+ $header[$i] = t($h);
+ }
+
static $rendered; //since we are rendering the whole thing in one go, we don't want to rerender for each fow
if ($rendered[$element['#field_name']] != TRUE) {
Comment #6
aaron1234nz commentedIssue fixed. The solution was similar to that in comment #5, however it I put it inside the matrix_process function instead.
Comment #9
chinita7 commentedThanks to #3, I did it as below for 6.2 version and it works.
Comment #10
tanmoy1981 commentedThis patch will work for D7, module version is 7.x-2.3.
Comment #11
tanmoy1981 commentedThe last patch file was not correct, use this one instead. Its for D7, version 7.x-2.3.
Comment #12
intrafusionRe-upload patch from #11 to trigger test-bot
Comment #13
intrafusionPatch OK, added to repo