{
// maximum number of characters to remain before the hyphen
// character in the resulting word of the hyphenation
short nMaxLeading = 6;
XHyphenatedWord xHyphWord = mxHyph.hyphenate( "waterfall",
aLocale, nMaxLeading ,
aEmptyProps );
if (xHyphWord == null)
System.out.println( "no valid hyphenation position found" );
else
{
System.out.println( "valid hyphenation pos found at "
+ xHyphWord.getHyphenationPos()
+ " in " + xHyphWord.getWord() );
System.out.println( "hyphenation char will be after char "
+ xHyphWord.getHyphenPos()
+ " in " + xHyphWord.getHyphenatedWord() );
}
//! Note: 'aProps' needs to have set 'IsGermanPreReform' to true!
xHyphWord = mxHyph.queryAlternativeSpelling( "Schiffahrt",
new Locale("de","DE",""), (short)4, aProps );
if (xHyphWord == null)
System.out.println( "no alternative spelling found at specified position." );
else
{
if (xHyphWord.isAlternativeSpelling())
System.out.println( "alternative spelling detectetd!" );
System.out.println( "valid hyphenation pos found at "
+ xHyphWord.getHyphenationPos()
+ " in " + xHyphWord.getWord() );
System.out.println( "hyphenation char will be after char "
+ xHyphWord.getHyphenPos()
+ " in " + xHyphWord.getHyphenatedWord() );
}
XPossibleHyphens xPossHyph = mxHyph.createPossibleHyphens("waterfall",
aLocale,