From b9e7866557c9f61da06775c81a94e7e19565ed45 Mon Sep 17 00:00:00 2001 From: Janumala Akhilendra <82641474+JanumalaAkhilendra@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:55:23 +0530 Subject: [PATCH] Update language-packs.md --- docs/extend/language-packs.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/extend/language-packs.md b/docs/extend/language-packs.md index 56be70d80..d2b4e137a 100644 --- a/docs/extend/language-packs.md +++ b/docs/extend/language-packs.md @@ -2,17 +2,17 @@ :::info -This documentation covers the technical structure of language packs. Read [this article](../contributing-docs-translations.md) for information on how to start / contribute to a Flarum language pack. +This documentation covers the technical structure of language packs. Read [this article](../contributing-docs-translations.md) for information on how to start/contribute to a Flarum language pack. ::: ## Declaring a Language Pack -Language packs should be their own extensions, with no other code / logic included. +Language packs should be their own extensions, with no other code/logic included. The [`LanguagePack` extender](https://github.com/flarum/framework/blob/main/framework/core/src/Extend/LanguagePack.php) allows you to define that your extension is a language pack. -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! +This extender has no setters. All you have to do is instantiate it, make sure your language pack is in the `locale` folder, and you're done! Here's a quick example from [Flarum English](https://github.com/flarum/lang-english/blob/master/extend.php): @@ -37,15 +37,15 @@ And that's it! It should work out of the box. Translation files should go in the `locale` directory. Each file should be named `EXTENSION_ID.yml`, where EXTENSION_ID is the [extension's ID](admin.md#telling-the-api-about-your-extension). -The contents of the file should correspond to the extension's english translations, with the values translated in your language. See our [internationalization](i18n.md) docs for more information. +The contents of the file should correspond to the extension's English translations, with the values translated into your language. See our [internationalization](i18n.md) docs for more information. ## DayJS Translations -Flarum use [the DayJS library](https://day.js.org/) to format and internationalize dates. +Flarum uses [the DayJS library](https://day.js.org/) to format and internationalize dates. You can create a `config.js` file in the `locale` directory to configure date internationalization for your language. -The file should look like: +The file should look like this: ```js dayjs.locale('xx');