Localization in Kanban

28 Sep 20206 minutes to read

Localization

All text in Kanban can be localized using ej.Kanban.Locale object. Please find the table with list of properties and its value in locale object.

Locale key words Text
[`EmptyCard`] No cards to display
[`SaveButton`] Save
[`CancelButton`] Cancel
[`EditFormTitle`] Details of
[`AddFormTitle`] Add New Card
[`SwimlaneCaptionFormat`] "- 8 item items "
[`FilterSettings`] Filters:
[`Min`] Min
[`Max`] Max
[`FilterOfText`] Of
[`Cards`] Cards
[`ItemsCount`] Items Count :
[`Unassigned`] Unassigned
[`AddCard`] Add Card
[`EditCard`] Edit Card
[`DeleteCard`] Delete Card
[`TopofRow`] Top of Row
[`BottomofRow`] Bottom of Row
[`MoveUp`] Move Up
[`MoveDown`] Move Down
[`MoveLeft`] Move Left
[`MoveRight`] Move Right
[`MovetoSwimlane`] Move to Swimlane
[`HideColumn`] Hide Column
[`VisibleColumns`] Visible Columns
[`PrintCard`] Print Card
[`Search`] Search

The following code example describes the above behavior.

  • HTML
  • <?php
        require_once '../EJ/AutoLoad.php';
        ?>
        <div class="cols-sample-area">
        <script>
            ej.Kanban.Locale["de-DE"] = {
                EmptyCard: "Keine Karten angezeigt werden",
                SaveButton: "Speichern",
                CancelButton: "stornieren",
                EditFormTitle: "Details von ",
                AddFormTitle: "Neue Karte hinzufügen",
                SwimlaneCaptionFormat: "- 8 Artikel  Artikel ",
                FilterSettings: "Filter:",
                FilterOfText: "Von",
                Max: "Max.",
                Min: "Min.",
                Cards: "Karten",
                ItemsCount: "Artikel Graf :",
                Unassigned: "Nicht zugewiesen",
            };
        </script>
        <?php
        $Json = '[{"Id": 1, "Status": "Open", "Summary": "Analyze the new requirements gathered from the customer.", "Type": "Story", "Priority": "Low", "Tags": "Analyze,Customer", "Estimate": 3.5, "Assignee": "Nancy Davloio", "ImgUrl": "Content/images/kanban/1.png", "RankId":1 }, { "Id": 2, "Status": "InProgress", "Summary": "Improve application performance", "Type": "Improvement", "Priority": "Normal", "Tags": "Improvement", "Estimate": 6, "Assignee": "Andrew Fuller", "ImgUrl": "Content/images/kanban/2.png", "RankId":1 }, { "Id": 3, "Status": "InProgress", "Summary": "Arrange a web meeting with the customer to get new requirements.", "Type": "Others", "Priority": "Critical", "Tags": "Meeting", "Estimate": 5.5, "Assignee": "Janet Leverling", "ImgUrl": "Content/images/kanban/3.png", "RankId":2 }, { "Id": 4, "Status": "InProgress", "Summary": "Fix the issues reported in the IE browser.", "Type": "Bug", "Priority": "Release Breaker", "Tags": "IE", "Estimate": 2.5, "Assignee": "Janet Leverling", "ImgUrl": "Content/images/kanban/3.png", "RankId":2 }, { "Id": 5, "Status": "Close", "Summary": "Fix the issues reported by the customer.", "Type": "Bug", "Priority": "Low", "Tags": "Customer", "Estimate": "3.5", "Assignee": "Steven walker", "ImgUrl": "Content/images/kanban/5.png", "RankId":1 }]';
        $Json = json_decode($Json,true);
        $kanban = new EJ\Kanban("default");
        $constraint = new EJ\Kanban\Constraint();
        $constraint ->max(2);
        $column = new EJ\Kanban\Column();
        $column ->key("Open")->headerText("Backlog");
        $column1 = new EJ\Kanban\Column();
        $column1 ->key("InProgress")->headerText("In Progress")->constraints($constraint);
        $column2 = new EJ\Kanban\Column();
        $column2 ->key("Close")->headerText("Done");
        $fields = new EJ\Kanban\Field();
        $fields ->content("Summary")->primaryKey("Id")->swimlaneKey('Assignee')->tag('Tags');
        $columns = array(
        $column,$column1,$column2
        );
        echo $kanban ->columns($columns)->dataSource($Json)->enableTotalCount(true)->locale("de-DE")->fields($fields)->keyField("Status")->render();
        ?>
        </div>

    The following output is displayed as a result of the above code example.

    Localization

    Right to Left (RTL)

    By default, Kanban render its text and layout from left to right. To customize Kanban’s direction, you can change direction from LTR to RTL by using enableRTL as true.

    The following code example describes the above behavior.

  • HTML
  • <?php
        require_once '../EJ/AutoLoad.php';
        ?>
        <div class="cols-sample-area">
        <script>
            ej.Kanban.Locale["ar-AE"] = {
                EmptyCard: "Keine Karten angezeigt werden",
                SaveButton: "Speichern",
                CancelButton: "stornieren",
                EditFormTitle: "Details von ",
                AddFormTitle: "Neue Karte hinzufügen",
                SwimlaneCaptionFormat: "- 8 Artikel  Artikel ",
                FilterSettings: "Filter:",
                FilterOfText: "Von",
                Max: "Max.",
                Min: "Min.",
                Cards: "Karten",
                ItemsCount: "Artikel Graf :",
                Unassigned: "Nicht zugewiesen",
            };
        </script>
        <?php
        $Json = '[{"Id": 1, "Status": "Open", "Summary": "Analyze the new requirements gathered from the customer.", "Type": "Story", "Priority": "Low", "Tags": "Analyze,Customer", "Estimate": 3.5, "Assignee": "Nancy Davloio", "ImgUrl": "Content/images/kanban/1.png", "RankId":1 }, { "Id": 2, "Status": "InProgress", "Summary": "Improve application performance", "Type": "Improvement", "Priority": "Normal", "Tags": "Improvement", "Estimate": 6, "Assignee": "Andrew Fuller", "ImgUrl": "Content/images/kanban/2.png", "RankId":1 }, { "Id": 3, "Status": "InProgress", "Summary": "Arrange a web meeting with the customer to get new requirements.", "Type": "Others", "Priority": "Critical", "Tags": "Meeting", "Estimate": 5.5, "Assignee": "Janet Leverling", "ImgUrl": "Content/images/kanban/3.png", "RankId":2 }, { "Id": 4, "Status": "InProgress", "Summary": "Fix the issues reported in the IE browser.", "Type": "Bug", "Priority": "Release Breaker", "Tags": "IE", "Estimate": 2.5, "Assignee": "Janet Leverling", "ImgUrl": "Content/images/kanban/3.png", "RankId":2 }, { "Id": 5, "Status": "Close", "Summary": "Fix the issues reported by the customer.", "Type": "Bug", "Priority": "Low", "Tags": "Customer", "Estimate": "3.5", "Assignee": "Steven walker", "ImgUrl": "Content/images/kanban/5.png", "RankId":1 }]';
        $Json = json_decode($Json,true);
        $kanban = new EJ\Kanban("default");
        $constraint = new EJ\Kanban\Constraint();
        $constraint ->max(2);
        $column = new EJ\Kanban\Column();
        $column ->key("Open")->headerText("Backlog");
        $column1 = new EJ\Kanban\Column();
        $column1 ->key("InProgress")->headerText("In Progress")->constraints($constraint);
        $column2 = new EJ\Kanban\Column();
        $column2 ->key("Close")->headerText("Done");
        $fields = new EJ\Kanban\Field();
        $fields ->content("Summary")->primaryKey("Id")->swimlaneKey('Assignee')->tag('Tags');
        $columns = array(
        $column,$column1,$column2
        );
        echo $kanban ->columns($columns)->dataSource($Json)->enableRTL(true)->allowTitle(true)->locale("de-DE")->fields($fields)->keyField("Status")->render();
        ?>
        </div>

    The following output is displayed as a result of the above code example.

    Right to left