def METHOD_NAME(ql: Qiling, address: int, params):
    locale_value = params["Locale"]
    lctype_value = params["LCType"]
    cchData = params["cchData"]
    local_dict = LOCALE.get(locale_value, None)
    if local_dict is None:
        # raise QlErrorNotImplemented("API not implemented")
        ql.os.last_error = ERROR_INVALID_PARAMETER
        return 0
    lctype = local_dict[lctype_value] + "\x00"
    if cchData != 0:
        lplcdata = params["lpLCData"]
        ql.mem.write(lplcdata, lctype.encode("utf-16le"))
    return len(lctype)