gpt4 book ai didi

javascript - hexo中的 `__()`(双下划线)函数是什么?

转载 作者:行者123 更新时间:2023-11-29 10:02:57 26 4
gpt4 key购买 nike

最近在学习搭建hexo主题,但是对__()函数有点迷茫。我没有在 hexo doc 中找到答案。我不知道这是内置的还是什么?

这段代码来自 theme-minos:

<span class="column is-narrow">
<% let words = word_count(post._content); %>
<% let time = duration((words / 150.0) * 60, 'seconds') %>
<%= `${ time.humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %>
</span>

谁能帮帮我?

最佳答案

终于在hexo文档中找到了答案。

Use __ or _p helpers in templates to get the translated strings. The former is for normal usage and the latter is for plural strings.

查看更多:https://hexo.io/docs/internationalization.html

关于javascript - hexo中的 `__()`(双下划线)函数是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51340450/

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