我正在研究R语言中的语言,我想知道什么是大写单词时的最佳实践.
en.yml:
hello: "hello"
Run Code Online (Sandbox Code Playgroud)
application.html.erb:
<%= link_to t(:hello).capitalize, hello_path %> (with capitalization)
<%= link_to t(:hello), hello_path %> (without capitalization)
Run Code Online (Sandbox Code Playgroud)
要么
en.yml:
Hello: "Hello"
hello: "hello"
Run Code Online (Sandbox Code Playgroud)
application.html.erb:
<%= link_to t(:Hello), hello_path %> (with capitalization)
<%= link_to t(:hello), hello_path %> (without capitalization)
Run Code Online (Sandbox Code Playgroud)