Thanks Edward- I did look for 'getlanguage()', but on an older version of
Leo...
Regards
J^n
On Monday, June 2, 2025 at 12:27:33 PM UTC+1 Edward K. Ream wrote:
> On Mon, Jun 2, 2025 at 4:40 AM jkn <[email protected]> wrote:
>
> how do I determine the language in effect for a given (or current) node?
>>
>
> Good question. Leo 6.8.4 (PR #4334
> <https://github.com/leo-editor/leo-editor/pull/4324>) contains
> significant changes in this area:
>
> - Deprecates c.scanAllDirectives and many directives-related functions
> in leoGlobals.py.
> - Adds *new getters*, including c.getLanguage(p).
>
> So my recommended answer is language = c.getLanguage(p).
>
> Replace p by c.p to get the language in effect for the current node
> (position).
>
> The definition of c.getLanguage is non-trivial :-)
>
> Edward
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/leo-editor/30a5e815-da19-4fe3-9c9a-1bc7620c8277n%40googlegroups.com.