We also would like to be able to create bilingual input forms - either
through i18n and message.properties or via input.forms_locale.xml etc.
Has there been any progress on this? Is a patch available for DSpace
1.8?
Bill Page.
On Wed, 06 Jul 2011 15:28:36 +0200 Claudia Jürgen
<Claudia.Juergen@...> wrote:
> Hello Mateusz,
>
>
>
> Am 06.07.2011 14:59, schrieb Mateusz Neumann:
> > * modifying
> > org.dspace.submit.step.DescribeStep.getInputsReader() so it would
> > use I18nUtil.getInputFormsFileName(locale) to get the actual
> > filename for input-forms (input-forms_pl.xml or input-forms.xml in
> > my case)
>
> I think some more changes are necesseary to
> [dspace-source]/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/DescribeStep.java
>
>
> Change
> private static void initializeInputsReader()
> to pass in a Locale and use it.
> private static void initializeInputsReader(Locale locale) throws
> DCInputsReaderException
> {
> INPUTS_READER = new
> DCInputsReader(I18nUtil.getInputFormsFileName(locale));
> }
>
>
> Remove the intitialization of the InputReader from
> public DescribeStep()
> and move it to a new setup method like
>
> public void setup(SourceResolver resolver, Map objectModel, String
> src, Parameters parameters)
> throws ProcessingException, SAXException, IOException
> {
> super.setup(resolver,objectModel,src,parameters);
> this.locale = context.getCurrentLocale();
> //Ensure that the InputsReader is initialized.
> try
> {
> initializeInputsReader(locale);
> }
> catch (DCInputsReaderException e)
> {
> throw new ProcessingException(e);
> }
> }
Well I have just applied your patch. It works. Thanks!
> Note that for each language configured as support even English you
> need an input-forms_LOCALE.xml file.
Yes, I knew it. Thanks.
Have you considered making input-forms.xml 'i18n-able'? Having texts
like 'xmlui.input_forms.authors.label' or
'xmlui.input_forms.authors.hint' translated in messages_LOCALE.xml
would make Manakin more readable, more consistent. Or wouldn't it?
Thanks a lot
--
Mateusz
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel