Bug 7821 - {langcode} will be replaced with current interface language
This makes bug 4032 support multi-language Koha installation which is important for some of Koha users. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> 1) After update XSLT system preferences are set to 'default'. All views (OPAC and staff, results and detail page) work and switching languages selects the correct translated file. 2) Leaving empty works and normal views are used. 3) Putting in a single URL without placeholder works. 4) Putting in a URL with placeholder works. Created local directories have to match the language codes. NOTE: In order to make the URLs and patchs work, the Utils file needs to be copied too. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
8f17915231
commit
f91bd36399
3 changed files with 10 additions and 4 deletions
|
@ -170,6 +170,12 @@ sub XSLTParse4Display {
|
||||||
"slim2OPACResults.xsl";
|
"slim2OPACResults.xsl";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $xslfilename =~ m/{langcode}/ ) {
|
||||||
|
my $lang = C4::Templates::_current_language;
|
||||||
|
$xslfilename =~ s/{langcode}/$lang/;
|
||||||
|
}
|
||||||
|
|
||||||
# grab the XML, run it through our stylesheet, push it out to the browser
|
# grab the XML, run it through our stylesheet, push it out to the browser
|
||||||
my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
|
my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
|
||||||
#return $record->as_formatted();
|
#return $record->as_formatted();
|
||||||
|
|
|
@ -51,12 +51,12 @@ OPAC:
|
||||||
- 'Display OPAC results using XSLT stylesheet at: '
|
- 'Display OPAC results using XSLT stylesheet at: '
|
||||||
- pref: OPACXSLTResultsDisplay
|
- pref: OPACXSLTResultsDisplay
|
||||||
class: file
|
class: file
|
||||||
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.'
|
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
|
||||||
-
|
-
|
||||||
- 'Display OPAC details using XSLT stylesheet at: '
|
- 'Display OPAC details using XSLT stylesheet at: '
|
||||||
- pref: OPACXSLTDetailsDisplay
|
- pref: OPACXSLTDetailsDisplay
|
||||||
class: file
|
class: file
|
||||||
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.'
|
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
|
||||||
-
|
-
|
||||||
- On pages displayed with XSLT stylesheets on the OPAC,
|
- On pages displayed with XSLT stylesheets on the OPAC,
|
||||||
- pref: DisplayOPACiconsXSLT
|
- pref: DisplayOPACiconsXSLT
|
||||||
|
|
|
@ -54,12 +54,12 @@ Staff Client:
|
||||||
- 'Display results in the staff client using XSLT stylesheet at: '
|
- 'Display results in the staff client using XSLT stylesheet at: '
|
||||||
- pref: XSLTResultsDisplay
|
- pref: XSLTResultsDisplay
|
||||||
class: file
|
class: file
|
||||||
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.'
|
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
|
||||||
-
|
-
|
||||||
- 'Display details in the staff client using XSLT stylesheet at: '
|
- 'Display details in the staff client using XSLT stylesheet at: '
|
||||||
- pref: XSLTDetailsDisplay
|
- pref: XSLTDetailsDisplay
|
||||||
class: file
|
class: file
|
||||||
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.'
|
- '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
|
||||||
-
|
-
|
||||||
- Use the Yahoo UI libraries
|
- Use the Yahoo UI libraries
|
||||||
- pref: yuipath
|
- pref: yuipath
|
||||||
|
|
Loading…
Reference in a new issue