ראה למדתי אתכם חקים ומשפטים כאשר צוני ה׳ אלקי לעשות כן בקרב הארץ אשר אתם באים שמה לרשתה. ושמרתם ועשיתם כי הוא חכמתכם ובינתכם לעיני העמים אשר ישמעון את כל החקים האלה ואמרו רק עם חכם ונבון הגוי הגדול הזה.
Surely I have taught you statutes and judgments, just as the Lord my God commanded me, that you should act according to them in the land which you go to possess. Therefore be careful to observe them; for this is your wisdom and your understanding in the sight of the peoples who will hear all these statutes, and say, "Surely this great nation is a wise and understanding people."Click here to read moreIt sounds to me, on the simplest level, to be praising the adherence to the Torah's commandments. But if so, why would that cause people call us a wise nation? I suspect that this is the reason that Rashi (quoting Chazal) that this refers to studying Torah. The Netziv (Ha'amek Davar, ad loc.) takes this a step further and says that it is talking about developing Torah through the various methods of halakhic deduction, i.e. creating new Torah. This, I think, might be a possible explanation of the midrash that there is no Torah among the gentile nations. While gentiles certainly have the intellectual capacity of studying Torah and offering insights into it, they cannot create new Torah. What they "create" via the methods of halakhic deduction do not become a part of Torah. Just a suggestion (see also these posts: I, II, III).
Going back to the original point, that the observance of commandments will cause others to see wisdom in the Torah, perhaps we can distinguish between the descriptions of a nation that is "chakham - wise" and "navon - understanding". Chakham/chokhmah refers to wisdom while navon/binah refers to the ability to distinguish and infer. Let us assume what I believe the Torah considers to be true: that fully observing the Torah's commandments on both an individual and communal level generally leads to a proper and respectful life. When the gentile nations see that a fully observant community has such respectful and peaceful lives, they will see the "social wisdom" in the Torah. It is the wisdom inherent in the Torah that leads the individual commandments to collectively yield such wonderful lives. As part of that, the Torah gives people the ability to distinguish between right and wrong in every aspect of their lives -- binah. It is these aspects -- social harmony and knowing right from wrong, that emerge from complete observance of the Torah's commandments -- that gentile nations will recognize. In other words, they will not directly praise the content of the Torah but, rather, they will indirectly praise it based on the wise and discriminating (in the good sense) behavior it engenders among its adherents.