The provisions prior to the latest amendments to the Criminal Code required the judge to inform the accused when he or she was not represented by counsel. It became apparent that that wasn't sufficient because, in many cases, counsel for the accused did not inform their client that he or she had the right to be heard in the minority language because counsel didn't want to lose the client.
Therefore, Ontario and New Brunswick added an obligation in that regard to their professional codes of conduct. The code recommended by the Canadian Bar Association requires a lawyer to inform clients of their language rights and stipulates that a lawyer cannot deny their client those rights. If a lawyer is unable to serve a client in the language of their choice, the lawyer must refer that person to someone else.