我想更改此文件viewer.properties中的一些属性:
save=Save
print=Print
reload=Reload
first.page=First Page
previous.page=Previous Page
next.page=Next Page
last.page=Last Page
go.to.page=Go To Page
actual.size=Actual Size
fit.page=Fit Page
fit.width=Fit Width
zoom.in=Zoom In
zoom.out=Zoom Out
zoom.ratio=Zoom Ratio
page=Page {0} of {1}
no.pages=The document has no pages.
error.saving=Error saving document. See the console for details.
error.printing=Error printing report. See the console for details.
error.loading=Error loading report. See the console for details.
error.hyperlink=Error encoutered when following hyperlink. See the console for details.
error.displaying=Error displaying report page. See the console for details.
file.exists=The file {0} already exists. Do you want to replace it?
file.desc.csv=CSV (*.csv)
file.desc.xml=XML (*.jrpxml, *.xml)
file.desc.xml.embedded.images=Embedded images XML (*.jrpxml, *.xml)
file.desc.html=HTML (*.htm, *.html)
file.desc.xls.single.sheet=Single sheet XLS (*.xls)
file.desc.xls.multiple.sheets=Multiple sheets XLS (*.xls)
file.desc.odt=ODT (*.odt)
file.desc.pdf=PDF (*.pdf)
file.desc.rtf=RTF (*.rtf)
file.desc.docx=DOCX (*.docx)
file.desc.jrprint=JasperReports (*.jrprint)
但我不想覆盖它。是否可以更改jasperreports.properties中的一些选项?我希望改变这两行的名称
file.desc.xls.single.sheet=Single sheet XLS (*.xls)
file.desc.xls.multiple.sheets=Multiple sheets XLS (*.xls)
对此:
file.desc.xls.single.sheet=Do jednego arkusza XLS (*.xls)
file.desc.xls.multiple.sheets=Do wielu arkuszy XLS (*.xls)
或者只是jasperreports.properties中的选项,用于更改我自己的viewer.properties的路径
答案 0 :(得分:0)
我在src / main / resources(maven nature)中创建了新的viewer.properties,然后在创建
时JasperViewer jasperViewer= new JasperViewer(DefaultJasperReportsContext.getInstance(),jasperPrint, false, Locale.getDefault(),resBundle)
我正在使用
ResourceBundle resBundle= ResourceBundle.getBundle("viewer");
这很有效。