gpt4 book ai didi

php - PHP gettext 中的变量

转载 作者:IT王子 更新时间:2023-10-29 00:09:49 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How does gettext handle dynamic content?

我正在使用 PHP 的 gettext。我想翻译一个包含变量的句子。这可能吗?

例如,英文:

你确定要阻止 Alice 吗?

(其中“Alice”是用户名。)

但是,在德语中,主语不会出现在句子的末尾。

Sind Sie sicher, dass Sie Alice blockieren?

在messages.po中,我有

msgid "BLOCK"
msgstr "Are you sure you want to block"

但我看不出有什么办法可以传递一个或多个变量。这可能吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com