Creating and Editing properties Files
On this page:
Basics
The properties files are used to store localization strings. RubyMine enables you to create new properties files, and detects the existing ones.
Creating locales
Important note: for plain Ruby projects, one has to manually create the
folder structure config/locales
, and put the properties files there. For Rails projects, this
folder structure is created automatically.
To create properties files
- Right-click
locales
directory. - On the context menu of the target directory, choose .
- In the New File dialog box, type the file name with the corresponding extension, and
click OK.
Note that you can also create nested directories under
locales
, and add new properties files there. - In the new
.yml
or.rb
file, create the required content.
Editing locales
While editing properties files, use the following techniques:
- Syntax highlighting: Keywords, delimiters, values and comments are highlighted. You can configure the color scheme in the Colors and Fonts page of the Settings/Preferences dialog.
- Code inspection helps you make sure the locale record matches file name:
- Expand word: Start typing, and press Alt+Slash to go through the existing strings.
See Also
Reference:
Last modified: 30 November 2016