I need to write my own IMLManager implemetation . I want to add one extra translation reference to all pages to keep common labels and messages.
If there is any abstract or default implementation of IMLManager exists , I would like to extend it . (I couldn’t find in javadoc ) .
Is there any implementation exists in API or should I start from the beginning?
Our default implementation is:
com.softwareag.cis.multilanguage.filebased.MLManager
This looks into /multilanguage//.csv for translation information.
Bjoern
Hi again ,
I extended default MLManager and overidden getString and checkIfExist methods.Everything works fine except one thing.The status of textid parameters looks not ready on Literal Assitant view of Layout Manager and I can’t see the default text.
I tried to override getApplicationStrings methods but this time I faced some RuntimeExceptions from com.softwareag.cis.file.FileManager class when I tried to open Html Preview or Literal Asistant windows.
( I guess “Literal Asistant” view gets textid’s from file directly and gets texts from MLManager.)
Is there a way to show my default texts in the Literal Asistant window ?
Thanks
My Class
public class MLManager extends com.softwareag.cis.multilanguage.filebased.MLManager {
private static String defaultFile="default";
public MLManager() {
super();
}
@Override
public boolean checkIfExists(java.lang.String language, java.lang.String project, java.lang.String application, java.lang.String literal) {
boolean res = super.checkIfExists(language,project,MLManager.defaultFile,literal);
return res ? res : super.checkIfExists(language,project,application,literal);
}
@Override
public String getString(java.lang.String language, java.lang.String project, java.lang.String application, java.lang.String literal, java.lang.String[] embeddedStrings) {
String res = super.getString(language, project, defaultFile, literal, embeddedStrings);
return res.charAt(0) != '$' ? res : super.getString(language, project, application, literal, embeddedStrings);
}
@Override
public String getString(java.lang.String language, java.lang.String project, java.lang.String application, java.lang.String literal) {
String res = super.getString(language, project, defaultFile, literal);
return res.charAt(0) != '$' ? res : super.getString(language, project, application, literal);
}
}
…the answer is: no - sorry…
The IMLManager interface is just a read-interface, not an edit-interface. The maintenance in the literal-assistant (as you already wrote) is following the (internal) edit-interface of our multi language manager.
We currently do not plan to extend the interface to be an edit-interface (because the edit-interface typically needs to 100% fit to the way of keeping the translation information).
Well, maybe the answer does not sound really nice, but represents the status quo…
Bjoern