Getting Started
Backend
Frontend
ExampleLanguageCreate a new Language packExport Package

Language

Create a new Language pack

In this article, we will guide you step by step to create a new language pack.

Firstly, please go to AdminCP > Apps and click on the Add Language button. The, follow wizard and fill the info of your language pack. For example, to create a French language pack, you can use the language code as fr , Vendor name as Company and App Name as French Pack.

On the server, the packages/company/french-pack/language/fr directory will be generated automatically. Its subdirectories contain namespaced and grouped translations. And, _root directory contains no namespaced translations.

Let's go to packages/company/french-pack/language/fr directory and dive deeper into activity/permisson.php file which contains phrases of permissions in Activity app

<?php
/* this is auto generated file */
return [
'can_can_purchase_sponsor_feed' => 'Activity Feed Can Purchase Sponsor Permission',
'can_can_sponsor_feed_feed' => 'Activity Feed Can Sponsor Feed Permission',
'can_create_activity_post' => 'Activity Post Create Permission',
'can_create_activity_snooze' => 'Activity Snooze Create Permission',
'can_create_feed' => 'Activity Feed Create Permission',
'can_delete_activity_post' => 'Activity Post Delete Permission',
'can_delete_activity_snooze' => 'Activity Snooze Delete Permission',
'can_delete_feed' => 'Activity Feed Delete Permission',
'can_hide_feed' => 'Activity Feed Hide Permission',
'can_moderate_activity_post' => 'Activity Post Moderate Permission',
'can_moderate_activity_snooze' => 'Activity Snooze Moderate Permission',
'can_moderate_feed' => 'Activity Feed Moderate Permission',
'can_update_activity_post' => 'Activity Post Update Permission',
'can_update_activity_snooze' => 'Activity Snooze Update Permission',
'can_update_feed' => 'Activity Feed Update Permission',
'can_view_activity_post' => 'Activity Post View Permission',
'can_view_activity_snooze' => 'Activity Snooze View Permission',
'can_view_feed' => 'Activity Feed View Permission'
];

Now, you can update phrase values for French language with any text editor tool. You can also refer to Example Translation for more details.

To keep your language pack easy to maintain, please do not add multiple languages in to single language pack.

Export Package

After updating and saving translation phrases on .php files, you can export language pack in AdminCP.

Top