High performance text component
Richard Bair
richard.bair at oracle.com
Thu Aug 30 12:09:30 PDT 2012
Hi Gaja,
I don't understand the issue. The entire string of the FXML fragment can be localized, or you can use CSS to apply a different style to different parts of the string based on a "localized css file". How does FXML not work for this case?
Richard
On Aug 30, 2012, at 5:40 AM, Gaja Sutra wrote:
> I have a concern for localization support of FXML against the split of each paragraph in multiple FXML span tags.
>
> By example, your first sample <p>Hello <b>Bold</b> <i>World</i></p>, can become in french <p>Bonjour <i>Monde</i> <b>Gras</b></p>, with different order of bold and italic styles. Like this case, FXML containing rich text will probably be separate for each language.
>
> I understand DOM-like API for manipulation but I think it will be more complex to localize than some annotated string.
>
> By example with a syntax like RTF/LaTeX <p>Hello \strong{Bold} \em{World}</p> and <p>Bonjour \em{Monde} \strong{Gras}</p>, you can localize only by substituting the string in the bundle, because your styles is not in FXML structure but only in the String containing text.
>
> NB: In this case, your command annotating text is associated, by example, to a custom CSS pseudo-class:
> p:strong {-fx-font-weight: bold;}
> p:em {-fx-font-style: italic;}
>
> NB: I know RTF/LaTeX syntax is not really beautiful. I am choosing this syntax only because special characters are not the same than XML and because ${...} is more frequently used for executing content (variable evaluation, etc.).
>
>
More information about the openjfx-dev
mailing list