Repository navigation
Conversation
claudiushenrichs
left a comment
There was a problem hiding this comment.
Clarification on <?php code samples and some more specific language regarding locale variants
|
|
||
| This extender has no setters. All you have to do is instantiate it, make sure you language pack is in the `locale` folder, and you're done! | ||
| ```php | ||
| <?php |
There was a problem hiding this comment.
Is this <?php intentionally left in? Seems the language is already declared in the code block head. If it's intentional there should also be a closing tag
|
|
||
| | Method | Description | | ||
| |--------|-------------| | ||
| | `code(string $code)` | The locale code, such as `en` or `pt-BR`. Required. | |
There was a problem hiding this comment.
Should be changed to "The language code (e.g. en) or locale variant (pt-BR)". Possibly even referring to ISO 639-1 for language code and ISO 3166-1 alpha-2 for the country code in the locale variant
| | Method | Description | | ||
| |--------|-------------| | ||
| | `code(string $code)` | The locale code, such as `en` or `pt-BR`. Required. | | ||
| | `title(string $title)` | The language's name, written in that language, such as `Español`. This is what the language selector shows. Required. | |
There was a problem hiding this comment.
"The language's endonym, the name written in that language, such as..."
| A language written right to left, such as Arabic, Hebrew or Persian, should set its direction to `rtl`: | ||
|
|
||
| ```php | ||
| <?php |
There was a problem hiding this comment.
Same comment here: is the "<?php" needed?
Documents flarum/framework#5305:
code(),title()anddirection()on theLanguagePackextender, and the deprecation ofextra.flarum-locale.