0

in the "delete selected documents" action it is possible to specify a confirm message, so i can tranlsate this message in every language. But, if no document was selected, a dialog appears with the message "Please select one or more documents to delete.". Is there any way to translate this message?

Thanks Mario

Mario Semper
  • 511
  • 1
  • 3
  • 17

1 Answers1

0

Here are some instructions on setting up translation in XPages:

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/UsingLocalizationOptions.htm

you can use this with a action. What happens is you will have a property file with strings, these will be translated and then the correct one will be used. something like:

<xp:eventHandler>
    <xp:this.action>
        <xp:actionGroup>
            <xp:confirm>
                <xp:this.message><![CDATA[#{javascript:
                    //where "strings" is a variable pointing to the resource bundle
                    strings.getString("confirm.message.delete");
                }]]></xp:this.message>
            </xp:confirm>

            ... delete code ...
        </xp:actionGroup>
    </xp:this.action>
</xp:eventHandler>
Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56
  • I know, but if no document is selected, the standard message "Please select one or more documents to delete." ist displayed, i cannot change this message anywhere i think.... – Mario Semper Jul 10 '12 at 07:40
  • a lot of the inbuilt messages do translate if you enable the settings as mentioned in the link. failing that it would be up to to ensure one is selected. A simple script running as the first part of the delete button could check is there a document open / selected. You could also use the property "condition" to decide if it is executed. Have one that deletes if there is a doc and one that displays an error message if not – Simon McLoughlin Jul 10 '12 at 07:47