Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following files shall be used for translations in future.

NameIn modulesPurposeNotes
auth.php
(error)
(error)Translation strings for authentication
helper

help.php
(tick)
(tick)Help messages for formular fieldsCurrently named helper.php ... will be renamed in future
messages.php
(tick)
(tick)Predominantly for log and error/warning messages (e.g. in modals)
validation.php
(error)
(error)All validation error messages
view.php
(tick)
(tick)Everything else that appears in views: Labels, Headlines, table headers, sidebar menu entries

Guidelines

...

  1. Use Array syntax
  2. Create module specific language files
  3. Use camelCase for array keys
Code Block
languagephp
titleExamples
$helpmessage/* Global / Generic used messages */
$helpmessage1 = trans('helperhelp.translate');

/* In file resources/lang/en/helperhelp.php */
return [
    'translate' => 'You can help translating NMS PRIME at',
];

/* Module specific */
$helpmessage2 = trans('billing::help.settlementrun.msg');

/* In file modules/BillingBase/Resources/lang/en/help.php */
return [
    'settlementrun' => [
        'msg' => 'This is a help message',
        'restartFailed' => 'The array key of the message is camel case!',
    ],
];