1
votes

I'm developing a web site / web app which supports multiple languages. I have the "view" part separated out into HTML templates, with "holes" left to populate the textual content.

I'm storing the various words and sentences for each language in an object. e.g.

lang.title = "Page title"
lang.header = "Page header"

Then printing them into the appropriate area of the template.

Is there any particular naming convention I should follow? After "Title" and "Header" it gets harder to describe the piece of text. You'd soon get into "paragraph1", "paragraph2", "paragraph3" etc etc.

A previous version of the app just have the variables holding the various bits of text named as: Trans1, Trans2, Trans3, Trans4, Trans5...etc

1

1 Answers