private static void addFormatted(XWPFParagraph p, String str, String color, Lang lang, Lang explang, NumberGender ng) {
        String s = str, ss; boolean first = true;
        while (StringUtils.isNotBlank(s)) {
            if (s.startsWith(StringHelper.LEFTPARENTHESIS)) {
                //intf.-lang.-based content
                s = StringUtils.stripStart(addParentheses(p, s, color,
                        (first && lang == explang) || (!first && lang != explang), explang, ng), null);
            } else if (s.startsWith(StringHelper.LEFTSQUAREBRACKET)) {
                s = StringUtils.stripStart(addSquareBrackets(p, s, color, lang, explang, ng), null);
            } else {
                ss = StringUtils.substringBefore(s, StringHelper.SPACE);
                if (!StringUtils.startsWithAny(s, StringHelper.DELIMITERS)) addSpace(p);
                addNormal(p, ss, color);
                s = StringUtils.stripStart(StringUtils.removeStart(s, ss), null);
            }

            first = false;
        }
    }