Adding Languages to Writer's Character, Font Menu
Richard Wordingham
richard.wordingham at ntlworld.com
Wed Jun 24 12:54:54 PDT 2015
On Wed, 24 Jun 2015 12:31:16 +0200
Eike Rathke <erack at redhat.com> wrote:
> > >* Allow arbitrary lang tags to be used in a text anywhere
> > OpenDocument allows these - it is just a question of how much
> > LibreOffice supports this.
> It does.
> > I believe the UNO interface supports this,
> > but I won't be sure until I've tried it.
> Simply in a css::lang::Locale set the Language field to "qlt" and in
> the Variant have the language tag, see
> http://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1lang_1_1Locale.html
It may be 'simply' to you, but my macro to set the language doesn't
progress beyond the '::' before 'Locale', failing with "Object not
accessible. Invalid object reference." I was using vanilla LibreOffice
4.3.3.2. My macro shorn of superfluous comments read:
sub Tai_Lue3
dim dispatcher as object
ThisComponent.CurrentController.Frame dispatcher =
createUnoService("com.sun.star.frame.DispatchHelper")
' dim args1(0) as new com.sun.star.beans.PropertyValue
' dim args1(0) as new css::lang::Locale
' dim args1(0) as new com::sun::star::lang::Locale
dim args1(0) as new com::sun::star::lang::locale
args1(0).Language ="qlt"
args1(0).Variant ="khb-CN"
dispatcher.executeDispatch(document, ".uno:Language", "", 0, args1())
end sub
The macro recorded from using the combobox just records the LCID
generated on the fly, which is not much use. It wouldn't mean the same
from editing session to editing session.
> > >* Be able to associate a language with CTL/CJK.
> > This is impossible for a few languages. Several languages exist in
> > competing scripts of different categories - Sanskrit and Pali may be
> > written in the Latin script as well as in Indic scripts, and I think
> > Sanskrit is also available in CJK. Several languages are used in
> > both the Latin script and in the national CTL script or in the
> > Arabic script.
>
> Then you will have different language tags that include the script,
> and have one associated with "Western" and one with CTL. I don't see
> the problem.
I am having great difficulty seeing why one should want to specify the
script for a barely supported writing system, let alone the class of
script. My thought was that the language code would suffice. The script
is generally implicit in the text. As far as text properties are
concerned, the class of script would be implicit in the box in which
the language name was entered.
Richard.
More information about the LibreOffice
mailing list