如何使用选项更改标题

发布于 2025-01-24 02:18:43 字数 341 浏览 2 评论 0原文

在V5 Pine编辑器中,我想使用input.bool添加语言选项。我想添加英语和法语选项,但不能。

示例:

lang = input.string(title="Language",
     options=["English", "French"],
     defval="English")
     
langg = (lang == "English") ? EN :
        (lang == "French") ? FR :
        EN

我想使用此代码进行标题更改。当我选择英语时,我想要英文标题,当我选择法语时,同一标题的法语版本将出现在设置屏幕上。

In v5 pine editor I want to add language option using input.bool. I want to add English and French options but I couldn't.

Example:

lang = input.string(title="Language",
     options=["English", "French"],
     defval="English")
     
langg = (lang == "English") ? EN :
        (lang == "French") ? FR :
        EN

I want to use this code for title change. When I choose English, I want the English title, and when I choose French, the French version of the same titles will appear on the settings screen.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梅窗月明清似水 2025-01-31 02:18:43

你不能这样做。

title input()函数的参数期望const String,这意味着其值必须在编译时已知。

如果您正在谈论更改系统语言,则不支持它。

You cannot do this.

The title argument of the input() function expects a const string which means its value must be known at compile time.

If you are talking about changing the system language, it is not supported.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文