Functionality of default localizer vs localizer from app's context

Question on behalf of @theodossios-steep-crest:

does anyone know if the default localizer, for example:

export function localizer(...localizable: Localizable[]): string {
    const defaultLocalizer = defaultLocalizerFactory({ locale: { country: "DE", language: "de" } });
    return defaultLocalizer(...localizable);
}

and the localizer from the app’s context:

export function useLocalizer() {
    return useContext(LocalizerContext).localizer;
} 

have the same functionality?

Reply on behalf of @theodossios-steep-crest:

to answer my question, it depends on how you initialize them, they can do the same things, since they internally call the same function, with the exception that the one can be passed down the tree as a react context, correct me if I am wrong

Yes, you are correct. By default, the DefaultLocalizerContextProvider uses the same defaultLocalizerFactory function to create its localizer.

If you want to use a custom localizer function, you can create it beforehand and pass it to your ContextProvider when setting it up (see also the docu about this on getA12).