开发者

ASP.NET MVC 3 multilingual website with Mustache templates

开发者 https://www.devze.com 2023-04-08 13:15 出处:网络
Was just wondering what the best approach is when creating a multi-lingual website that uses Mustache templates (or any other templating library). If for example you had the following template:

Was just wondering what the best approach is when creating a multi-lingual website that uses Mustache templates (or any other templating library). If for example you had the following template:

<table class="tabl开发者_如何学编程esorter zebra-striped">
<thead>
    <tr>
        <td>Name</td>
        <td>Description</td>
        <td>Comments</td>
    </tr>
</thead>
<tbody>
    {{#list}}
        <tr>
            <td>{{Name}}</td>
            <td>{{Description}}</td>
            <td>{{Comments}}</td>
        </tr>
    {{/list}}
</tbody>
</table>

What would be the best way to display langauge specific text for the table headings ('Name', 'Description', 'Comments'). Render on the server maybe?


Too much information for a SO answer, so I will refer you to Scott Hanselman's blog post on the topic.


I would with Mustache if you want a clean platform neutral solution. The Hanselman approach is for .Net only.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号