Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Listen for system language changes.
registerLangListener(langListener: PluginEventListener): PluginEventSubscription;
langListener
PluginEventListener
onMsg(msg)
msg
PluginEventSubscription
remove()
en
zh_CN
zh_TW
ja
interface PluginEventListener { onMsg(msg: string): void; }
type PluginEventSubscription = { remove(): void; };
import { PluginManager } from 'sn-plugin-lib'; /** * Example: listen for system language changes. */ export async function exampleRegisterLangListener() { const sub = PluginManager.registerLangListener({ onMsg(langCode) { console.log('lang changed:', langCode); }, }); return sub; }