@mica/sdk (SDK contract v1)
    Preparing search index...

    Function useLocale

    • The phone's language (MICA-61): the active locale, the translator, and — for Settings only — the way to change it.

      t is the same derived store whether an app runs in-process or in a sandboxed frame, because catalogs are registered in the bundle that reads them; only locale crosses the host seam. setLocale is refused to an add-on by MEMBER_ALLOWLIST.

      Returns {
          availableLocales: () => string[];
          locale: Readable<string>;
          plural: (
              key: string,
              count: number,
              params?: Readonly<Record<string, string | number>>,
          ) => string;
          setLocale: (next: string) => void;
          t: Readable<Translate>;
      }

      • availableLocales: () => string[]
      • locale: Readable<string>
      • plural: (
            key: string,
            count: number,
            params?: Readonly<Record<string, string | number>>,
        ) => string
      • setLocale: (next: string) => void
      • t: Readable<Translate>

        The translator, as a store, so a component re-renders when the locale changes or a catalog arrives: $t('notes.saved'), $t('notes.count', { count }).