returns localized month name of "fulldate" to "locale" or system locale if param is empty)
Let (
[
_month = Month (fulldate);
_es = List("Enero";"Febrero";"Marzo";"Abril";"Mayo";"Junio";"Julio";"Agosto";"Septiembre";"Octubre";"Noviembre";"Diciembre");
_ca = List("Gener";"Febrer";"Març";"Abril";"Maig";"Juny";"Juliol";"Agost";"Setembre";"Octubre";"Novembre";"Desembre");
_error = Case(
isEmpty(fulldate); "Date required";
not isEmpty(locale) and (locale ≠ "es" and locale ≠ "ca"); "Not supported locale";
"");
_source = Case(locale="ca";_ca; locale="es";_es; "")
];
Case(
_error; _error;
isEmpty(_source); MonthName(_month);
getValue(_source; _month)
)
)