Home | Index

r3 Quick Start Guide

Edit a template, add translation

  1. You already created a template using the r3 target create command, in the steps above. Use your favorite editor to edit your template (our example uses vim as the editor).

    $ vim $R3HOME/templates/myproduct/us/index.html/index.html.ros
    [Note] Note

    If you've exported the environment variable $VISUAL or $EDITOR, you can accomplish the same thing with the r3 template edit command.

    $ r3 template edit myproduct/us/index.html index.html.ros

    However you decide to open the file, you'll see it consists of a single comment:

    <!-- autogenerated default template: index.html.ros -->
  2. Delete the comment and enter the following HTML:

    <html>
    <head></head>
    <body>
    <p>Container: <r3:trans>Container</r3:trans> </p>
    <p>Chair: <r3:trans>Chair</r3:trans> </p>
    </body>
    </html>
  3. Add a translation:

    $ r3 translation set myproduct/us chair chair