RTL is used for displaying languages that go from Right to Left, eg Hebrew and Arabic. To get AG Grid to display in RTL format, set the property enableRtl=true.
RTL Example Copy Link
Below shows a grid in RTL mode. Use the language selector to switch between Arabic, Hebrew and English to see how the grid adapts to different RTL languages.
import {
AG_GRID_LOCALE_EG,
AG_GRID_LOCALE_IL,
} from "@ag-grid-community/locale";
import { Component, signal } from "@angular/core";
import { AgGridAngular } from "ag-grid-angular";
import type { ColDef } from "ag-grid-community";
import {
ClientSideRowModelModule,
LocaleModule,
ModuleRegistry,
NumberEditorModule,
NumberFilterModule,
TextEditorModule,
TextFilterModule,
enableDevValidations,
} from "ag-grid-community";
import "./styles.css";
if (process.env.NODE_ENV !== "production") {
// Enable extended validations only for development
enableDevValidations();
}
ModuleRegistry.registerModules([
NumberEditorModule,
TextEditorModule,
TextFilterModule,
NumberFilterModule,
ClientSideRowModelModule,
LocaleModule,
]);
type Language = "arabic" | "hebrew" | "english";
interface LanguageConfig {
localeText: Record<string, string> | undefined;
enableRtl: boolean;
columnDefs: ColDef[];
rowData: Record<string, any>[];
}
const LANGUAGES: Record<Language, LanguageConfig> = {
arabic: {
localeText: AG_GRID_LOCALE_EG,
enableRtl: true,
columnDefs: [
{ field: "city", headerName: "ุงูู
ุฏููุฉ" },
{ field: "country", headerName: "ุงูุจูุฏ" },
{ field: "population", headerName: "ุนุฏุฏ ุงูุณูุงู" },
{ field: "area", headerName: "ุงูู
ุณุงุญุฉ (ูู
ยฒ)" },
],
rowData: [
{ city: "ุงููุงูุฑุฉ", country: "ู
ุตุฑ", population: 21_323_000, area: 3_085 },
{
city: "ุงูุฑูุงุถ",
country: "ุงูุณุนูุฏูุฉ",
population: 7_677_000,
area: 1_798,
},
{ city: "ุฏุจู", country: "ุงูุฅู
ุงุฑุงุช", population: 3_564_000, area: 1_588 },
{
city: "ุงูุฏุงุฑ ุงูุจูุถุงุก",
country: "ุงูู
ุบุฑุจ",
population: 3_752_000,
area: 384,
},
{ city: "ุจุบุฏุงุฏ", country: "ุงูุนุฑุงู", population: 8_126_000, area: 673 },
{ city: "ุงูุฌุฒุงุฆุฑ", country: "ุงูุฌุฒุงุฆุฑ", population: 3_915_000, area: 363 },
{ city: "ุนู
ูุงู", country: "ุงูุฃุฑุฏู", population: 4_008_000, area: 1_680 },
{ city: "ุชููุณ", country: "ุชููุณ", population: 2_365_000, area: 212 },
{ city: "ุจูุฑูุช", country: "ูุจูุงู", population: 2_434_000, area: 67 },
{ city: "ุงููููุช", country: "ุงููููุช", population: 2_989_000, area: 200 },
],
},
hebrew: {
localeText: AG_GRID_LOCALE_IL,
enableRtl: true,
columnDefs: [
{ field: "city", headerName: "ืขืืจ" },
{ field: "country", headerName: "ืืืื ื" },
{ field: "population", headerName: "ืืืืืืกืืื" },
{ field: "area", headerName: "ืฉืื (ืงืืดืจ)" },
],
rowData: [
{ city: "ืืจืืฉืืื", country: "ืืฉืจืื", population: 982_000, area: 126 },
{ city: "ืชื ืืืื", country: "ืืฉืจืื", population: 467_000, area: 52 },
{ city: "ืืืคื", country: "ืืฉืจืื", population: 285_000, area: 64 },
{ city: "ืจืืฉืื ืืฆืืื", country: "ืืฉืจืื", population: 254_000, area: 59 },
{ city: "ืคืชื ืชืงืืื", country: "ืืฉืจืื", population: 247_000, area: 36 },
{ city: "ืืฉืืื", country: "ืืฉืจืื", population: 226_000, area: 47 },
{ city: "ื ืชื ืื", country: "ืืฉืจืื", population: 221_000, area: 29 },
{ city: "ืืืจ ืฉืืข", country: "ืืฉืจืื", population: 210_000, area: 117 },
{ city: "ืืืืื", country: "ืืฉืจืื", population: 196_000, area: 19 },
{ city: "ืื ื ืืจืง", country: "ืืฉืจืื", population: 204_000, area: 7 },
],
},
english: {
localeText: undefined,
enableRtl: false,
columnDefs: [
{ field: "city", headerName: "City" },
{ field: "country", headerName: "Country" },
{ field: "population", headerName: "Population" },
{ field: "area", headerName: "Area (kmยฒ)" },
],
rowData: [
{
city: "London",
country: "United Kingdom",
population: 9_541_000,
area: 1_572,
},
{
city: "New York",
country: "United States",
population: 8_336_000,
area: 783,
},
{
city: "Sydney",
country: "Australia",
population: 5_312_000,
area: 12_368,
},
{ city: "Toronto", country: "Canada", population: 2_794_000, area: 630 },
{ city: "Dublin", country: "Ireland", population: 1_263_000, area: 115 },
{
city: "Cape Town",
country: "South Africa",
population: 4_618_000,
area: 2_461,
},
{
city: "Singapore",
country: "Singapore",
population: 5_917_000,
area: 733,
},
{
city: "Auckland",
country: "New Zealand",
population: 1_657_000,
area: 1_086,
},
{ city: "Mumbai", country: "India", population: 21_297_000, area: 603 },
{ city: "Nairobi", country: "Kenya", population: 4_922_000, area: 696 },
],
},
};
@Component({
standalone: true,
imports: [AgGridAngular],
selector: "my-app",
template: `
<div class="example-wrapper">
<div
style="margin-bottom: 0.5rem; display: flex; gap: 0.5rem; align-items: center;"
>
<label for="language">Language:</label>
<select id="language" (change)="onLanguageChange($event)">
<option value="arabic" selected>ุงูุนุฑุจูุฉ (Arabic)</option>
<option value="hebrew">ืขืืจืืช (Hebrew)</option>
<option value="english">English</option>
</select>
</div>
@if (gridVisible()) {
<ag-grid-angular
style="width: 100%; height: 100%;"
[enableRtl]="enableRtl"
[columnDefs]="columnDefs"
[rowData]="rowData"
[localeText]="localeText"
[defaultColDef]="defaultColDef"
/>
}
</div>
`,
})
export class AppComponent {
public language = signal<Language>("arabic");
public gridVisible = signal(true);
public defaultColDef: ColDef = {
editable: true,
flex: 1,
minWidth: 100,
filter: true,
};
// Getters re-read the active language config on each change-detection tick so the
// recreated grid always mounts with the current columns, data, RTL flag and locale.
public get columnDefs(): ColDef[] {
return LANGUAGES[this.language()].columnDefs;
}
public get rowData(): Record<string, any>[] {
return LANGUAGES[this.language()].rowData;
}
public get enableRtl(): boolean {
return LANGUAGES[this.language()].enableRtl;
}
public get localeText(): Record<string, string> | undefined {
return LANGUAGES[this.language()].localeText;
}
// enableRtl is an initial-only option, so switching language recreates the grid.
public onLanguageChange(event: Event): void {
const next = (event.target as HTMLSelectElement).value as Language;
this.gridVisible.set(false);
this.language.set(next);
setTimeout(() => this.gridVisible.set(true));
}
}
.example-wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
#myGrid {
flex: 1 1 0px;
width: 100%;
}
import '@angular/compiler';
import { provideHttpClient } from '@angular/common/http';
import { enableProdMode } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
if (new URLSearchParams(window.location.search).get('prod') !== 'false') {
enableProdMode();
}
const app = bootstrapApplication(AppComponent, {
providers: [provideHttpClient()],
});
Complex Example Copy Link
Below shows a more complex example with the tool panel and pinned areas visible to demonstrate edge cases of RTL. This example uses AG Grid Enterprise, so the tool panel and context menus are active. Use the language selector to switch between RTL languages.
import { Component, signal } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { AgChartsEnterpriseModule } from "ag-charts-enterprise";
import { AgGridAngular } from "ag-grid-angular";
import type {
CellClassParams,
CellStyle,
ColDef,
ColGroupDef,
DefaultMenuItem,
GetContextMenuItemsParams,
ICellRendererParams,
IRowNode,
MenuItemDef,
RowSelectedEvent,
RowSelectionOptions,
SelectionChangedEvent,
StatusPanelDef,
ValueSetterParams,
} from "ag-grid-community";
import {
LocaleModule,
ModuleRegistry,
enableDevValidations,
} from "ag-grid-community";
import { AllEnterpriseModule } from "ag-grid-enterprise";
import { CountryCellRenderer } from "./country-cell-renderer.component";
import { COUNTRY_CODES, LANGUAGES, createRowData } from "./data";
import type { LanguageConfig } from "./data";
import "./styles.css";
if (process.env.NODE_ENV !== "production") {
// Enable extended validations only for development
enableDevValidations();
}
ModuleRegistry.registerModules([
AllEnterpriseModule.with(AgChartsEnterpriseModule),
LocaleModule,
]);
const dataSize: string = ".1x22";
// The active language configuration. Mutated on every language switch so the framework-agnostic
// renderers/comparators/column builders below read the current locale exactly as in the vanilla example.
let currentLang: LanguageConfig = LANGUAGES["arabic"];
function getAutoGroupColumnDef(): ColDef {
return {
headerName: currentLang.headers.group,
width: 200,
field: "name",
valueGetter: (params) => {
if (params.node && params.node.group) {
return params.node.key;
} else {
return params.data[params.colDef.field!];
}
},
cellRenderer: "agGroupCellRenderer",
};
}
function createDefaultCols(): (ColDef | ColGroupDef)[] {
const firstColumn: ColDef = {
headerName: currentLang.headers.name,
field: "name",
width: 200,
editable: true,
enableRowGroup: true,
icons: {
sortAscending: '<i class="fa fa-sort-alpha-up"/>',
sortDescending: '<i class="fa fa-sort-alpha-down"/>',
},
};
const cols: (ColDef | ColGroupDef)[] = [
{
headerName: currentLang.headers.participant,
children: [
firstColumn,
{
headerName: currentLang.headers.language,
field: "language",
width: 150,
editable: true,
filter: "agSetColumnFilter",
cellRenderer: languageCellRenderer,
cellEditor: "agSelectCellEditor",
enableRowGroup: true,
enablePivot: true,
cellEditorParams: {
values: currentLang.editorLanguages,
},
pinned: "right",
headerTooltip: currentLang.headers.languageTooltip,
},
{
headerName: currentLang.headers.country,
field: "country",
width: 150,
editable: true,
cellRenderer: CountryCellRenderer,
enableRowGroup: true,
enablePivot: true,
cellEditor: "agRichSelectCellEditor",
cellEditorParams: {
cellRenderer: CountryCellRenderer,
values: currentLang.editorCountries,
},
filterParams: {
cellRenderer: CountryCellRenderer,
},
},
],
},
{
headerName: currentLang.headers.gameOfChoice,
children: [
{
headerName: currentLang.headers.gameName,
field: "game.name",
width: 180,
editable: true,
filter: "agSetColumnFilter",
tooltip: true,
cellClass: () => {
return "alphabet";
},
enableRowGroup: true,
enablePivot: true,
pinned: "left",
icons: {
sortAscending: '<i class="fa fa-sort-alpha-up"/>',
sortDescending: '<i class="fa fa-sort-alpha-down"/>',
},
},
{
headerName: currentLang.headers.bought,
field: "game.bought",
filter: "agSetColumnFilter",
editable: true,
width: 100,
enableRowGroup: true,
enablePivot: true,
enableValue: true,
cellRenderer: booleanCellRenderer,
cellStyle: { "text-align": "center" },
comparator: booleanComparator,
filterParams: { cellRenderer: booleanFilterCellRenderer },
},
],
},
{
groupId: "performance",
children: [
{
headerName: currentLang.headers.bankBalance,
field: "bankBalance",
width: 150,
editable: true,
cellRenderer: currencyRenderer,
cellStyle: currencyCssFunc,
filter: "agNumberColumnFilter",
enableValue: true,
icons: {
sortAscending: '<i class="fa fa-sort-amount-up"/>',
sortDescending: '<i class="fa fa-sort-amount-down"/>',
},
},
{
headerName: currentLang.headers.extraInfo1,
columnGroupShow: "open",
width: 150,
editable: false,
sortable: false,
suppressHeaderMenuButton: true,
cellStyle: { "text-align": "right" },
cellRenderer: () => {
return currentLang.cellContent.abra;
},
},
{
headerName: currentLang.headers.extraInfo2,
columnGroupShow: "open",
width: 150,
editable: false,
sortable: false,
suppressHeaderMenuButton: true,
cellStyle: { "text-align": "left" },
cellRenderer: () => {
return currentLang.cellContent.cadabra;
},
},
],
},
{
headerName: currentLang.headers.rating,
field: "rating",
width: 100,
editable: true,
cellRenderer: ratingRenderer,
enableRowGroup: true,
enablePivot: true,
enableValue: true,
filterParams: { cellRenderer: ratingFilterRenderer },
},
{
headerName: currentLang.headers.totalWinnings,
field: "totalWinnings",
filter: "agNumberColumnFilter",
editable: true,
valueSetter: numberValueSetter,
width: 150,
enableValue: true,
cellRenderer: currencyRenderer,
cellStyle: currencyCssFunc,
icons: {
sortAscending: '<i class="fa fa-sort-amount-up"/>',
sortDescending: '<i class="fa fa-sort-amount-down"/>',
},
},
];
const monthGroup: ColGroupDef = {
headerName: currentLang.headers.monthlyBreakdown,
children: [],
};
cols.push(monthGroup);
for (let i = 0, len = currentLang.months.length; i < len; ++i) {
const month = currentLang.months[i];
const child: ColDef = {
headerName: month,
field: "month_" + i,
width: 100,
filter: "agNumberColumnFilter",
editable: true,
enableValue: true,
cellClassRules: {
"good-score": 'typeof x === "number" && x > 50000',
"bad-score": 'typeof x === "number" && x < 10000',
},
valueSetter: numberValueSetter,
cellRenderer: currencyRenderer,
cellStyle: { "text-align": "right" },
};
monthGroup.children.push(child);
}
return cols;
}
function getColCount() {
switch (dataSize) {
case "10x100":
return 100;
default:
return 22;
}
}
function createCols() {
const colCount = getColCount();
const defaultCols = createDefaultCols();
const columns = defaultCols.slice(0, colCount);
for (let col = 22; col < colCount; col++) {
const colName = currentLang.colNames[col % currentLang.colNames.length];
const colDef = {
headerName: colName,
field: "col" + col,
width: 200,
editable: true,
};
columns.push(colDef);
}
return columns;
}
function numberValueSetter(params: ValueSetterParams) {
const newValue = params.newValue;
let valueAsNumber;
if (newValue === null || newValue === undefined || newValue === "") {
valueAsNumber = null;
} else {
valueAsNumber = parseFloat(params.newValue);
}
const field = params.colDef.field!;
const data = params.data;
data[field] = valueAsNumber;
return true;
}
function currencyCssFunc(params: CellClassParams): CellStyle {
if (params.value !== null && params.value !== undefined && params.value < 0) {
return { color: "red", "text-align": "right", "font-weight": "bold" };
} else {
return { "text-align": "right" };
}
}
function ratingFilterRenderer(params: ICellRendererParams) {
return ratingRendererGeneral(params.value, true);
}
function ratingRenderer(params: ICellRendererParams) {
return ratingRendererGeneral(params.value, false);
}
function ratingRendererGeneral(value: any, forFilter: boolean) {
if (value === "(Select All)") {
return value;
}
let result = "<span>";
for (let i = 0; i < 5; i++) {
if (value > i) {
result +=
'<img src="https://www.ag-grid.com/example-assets/gold-star.png" />';
}
}
if (forFilter && Number(value) === 0) {
result += currentLang.cellContent.noStars;
}
return result;
}
function currencyRenderer(params: ICellRendererParams) {
if (params.value === null || params.value === undefined) {
return null;
} else if (isNaN(params.value)) {
return "NaN";
} else {
if (params.node.group && params.column!.getAggFunc() === "count") {
return params.value;
} else {
return (
"£" +
Math.floor(params.value)
.toString()
.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
);
}
}
}
function booleanComparator(value1: any, value2: any) {
const value1Cleaned = booleanCleaner(value1);
const value2Cleaned = booleanCleaner(value2);
const value1Ordinal =
value1Cleaned === true ? 0 : value1Cleaned === false ? 1 : 2;
const value2Ordinal =
value2Cleaned === true ? 0 : value2Cleaned === false ? 1 : 2;
return value1Ordinal - value2Ordinal;
}
function booleanCellRenderer(params: ICellRendererParams) {
const valueCleaned = booleanCleaner(params.value);
if (valueCleaned === true) {
return "<span title='true'>✔</span>";
} else if (valueCleaned === false) {
return "<span title='false'>✖</span>";
} else if (params.value !== null && params.value !== undefined) {
return params.value.toString();
} else {
return null;
}
}
function booleanFilterCellRenderer(params: ICellRendererParams) {
const valueCleaned = booleanCleaner(params.value);
if (valueCleaned === true) {
return "✔";
} else if (valueCleaned === false) {
return "✖";
} else if (params.value === "(Select All)") {
return params.value;
} else {
return currentLang.cellContent.empty;
}
}
function booleanCleaner(value: any) {
if (value === "true" || value === true || value === 1) {
return true;
} else if (value === "false" || value === false || value === 0) {
return false;
} else {
return null;
}
}
function languageCellRenderer(params: ICellRendererParams) {
if (params.value !== null && params.value !== undefined) {
return params.value;
} else {
return null;
}
}
@Component({
standalone: true,
imports: [AgGridAngular, FormsModule],
selector: "my-app",
template: `
<div class="example-wrapper">
<div
style="margin-bottom: 0.5rem; display: flex; gap: 0.5rem; align-items: center"
>
<label for="language">Language:</label>
<select
id="language"
[ngModel]="language"
(ngModelChange)="onLanguageChange($event)"
>
<option value="arabic">ุงูุนุฑุจูุฉ (Arabic)</option>
<option value="hebrew">ืขืืจืืช (Hebrew)</option>
<option value="english">English</option>
</select>
</div>
@if (gridVisible()) {
<ag-grid-angular
style="width: 100%; height: 100%;"
[columnDefs]="columnDefs"
[autoGroupColumnDef]="autoGroupColumnDef"
[enableRtl]="enableRtl"
[localeText]="localeText"
[defaultColDef]="defaultColDef"
[sideBar]="true"
[rowGroupPanelShow]="'always'"
[pivotPanelShow]="'always'"
[statusBar]="statusBar"
[rowSelection]="rowSelection"
[context]="context"
[rowData]="rowData"
[getContextMenuItems]="getContextMenuItems"
[getBusinessKeyForNode]="getBusinessKeyForNode"
(rowSelected)="onRowSelected($event)"
(selectionChanged)="onSelectionChanged($event)"
/>
}
</div>
`,
})
export class AppComponent {
// Arabic is the default language and is selected first in the dropdown.
public language: string = "arabic";
// enableRtl and localeText are initial-only grid options, so the grid is remounted (via this
// signal + @if) whenever the language changes; the per-language inputs are recomputed first.
public readonly gridVisible = signal(true);
public columnDefs!: (ColDef | ColGroupDef)[];
public autoGroupColumnDef!: ColDef;
public enableRtl: boolean = false;
public localeText: Record<string, string> | undefined;
public rowData!: any[];
public readonly defaultColDef: ColDef = {
editable: true,
minWidth: 100,
filter: true,
floatingFilter: true,
};
public readonly context = { COUNTRY_CODES };
public readonly statusBar: { statusPanels: StatusPanelDef[] } = {
statusPanels: [{ statusPanel: "agAggregationComponent" }],
};
public readonly rowSelection: RowSelectionOptions = {
mode: "multiRow",
groupSelects: "descendants",
selectAll: "filtered",
};
constructor() {
this.rebuildGridInputs();
}
public onLanguageChange(language: string): void {
this.language = language;
this.gridVisible.set(false);
this.rebuildGridInputs();
setTimeout(() => {
this.gridVisible.set(true);
});
}
public readonly getBusinessKeyForNode = (node: IRowNode): string => {
if (node.data) {
return node.data.name;
} else {
return "";
}
};
public readonly getContextMenuItems = (
params: GetContextMenuItemsParams,
): (DefaultMenuItem | MenuItemDef)[] => {
const result: (DefaultMenuItem | MenuItemDef)[] =
params.defaultItems!.splice(0);
result.push({
name: currentLang.contextMenu.customMenuItem,
icon: '<img src="https://www.ag-grid.com/example-assets/lab.png" style="width: 14px;" />',
action: () => {
const value = params.value ? params.value : "<empty>";
console.log("You clicked a custom menu item on cell " + value);
},
});
return result;
};
public onSelectionChanged(event: SelectionChangedEvent): void {
console.log(
"Callback selectionChanged: selection count = " +
event.selectedNodes?.length,
);
}
public onRowSelected(event: RowSelectedEvent): void {
// the number of rows selected could be huge, if the user is grouping and selects a group, so
// to stop the console from clogging up, we only print if in the first 10 (by chance we know
// the node id's are assigned from 0 upwards)
if (Number(event.node.id) < 10) {
const valueToPrint = event.node.group
? "group (" + event.node.key + ")"
: event.node.data.name;
console.log("Callback rowSelected: " + valueToPrint);
}
}
// Recomputes every per-language grid input against the selected language before the grid remounts.
private rebuildGridInputs(): void {
currentLang = LANGUAGES[this.language];
this.columnDefs = createCols();
this.autoGroupColumnDef = getAutoGroupColumnDef();
this.enableRtl = currentLang.enableRtl;
this.localeText = currentLang.localeText;
this.rowData = createRowData(this.language);
}
}
.example-wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
ag-grid-angular {
flex: 1 1 0px;
width: 100%;
}
import { Component, signal } from "@angular/core";
import type { ICellRendererAngularComp } from "ag-grid-angular";
import type { ICellRendererParams } from "ag-grid-community";
@Component({
standalone: true,
template: `<span
style="cursor: default; overflow: hidden; text-overflow: ellipsis"
>
@if (flagCode()) {
<img
class="flag"
border="0"
width="15"
height="10"
src="https://flags.fmcdn.net/data/flags/mini/{{ flagCode() }}.png"
/>
}
{{ textValue() }}
</span>`,
})
export class CountryCellRenderer implements ICellRendererAngularComp {
public readonly textValue = signal<string | undefined>(undefined);
public readonly flagCode = signal<string | undefined>(undefined);
public agInit(params: ICellRendererParams): void {
this.flagCode.set(undefined);
const value = params.value;
// Blank, empty or the set-filter "Select All" entry: show the raw value with no flag.
if (value == null || value === "" || value === "(Select All)") {
this.textValue.set(value);
return;
}
// Only render a flag when a country code resolves; the localised Arabic/Hebrew names have no
// entry in COUNTRY_CODES, so guarding here avoids requesting undefined.png (404s).
const code = params.context.COUNTRY_CODES[value];
if (code) {
this.flagCode.set(code);
}
this.textValue.set(value);
}
public refresh(): boolean {
return false;
}
}
import {
AG_GRID_LOCALE_EG,
AG_GRID_LOCALE_IL,
} from "@ag-grid-community/locale";
export interface LanguageConfig {
localeText: Record<string, string> | undefined;
enableRtl: boolean;
headers: {
group: string;
participant: string;
name: string;
language: string;
languageTooltip: string;
country: string;
gameOfChoice: string;
gameName: string;
bought: string;
bankBalance: string;
extraInfo1: string;
extraInfo2: string;
rating: string;
totalWinnings: string;
monthlyBreakdown: string;
};
months: string[];
contextMenu: {
customMenuItem: string;
};
cellContent: {
abra: string;
cadabra: string;
noStars: string;
empty: string;
};
colNames: string[];
countries: { country: string; continent: string; language: string }[];
games: string[];
firstNames: string[];
lastNames: string[];
editorLanguages: string[];
editorCountries: string[];
}
const ENGLISH: LanguageConfig = {
localeText: undefined,
enableRtl: false,
headers: {
group: "Group",
participant: "Participant",
name: "Name",
language: "Language",
languageTooltip: "Example tooltip for Language",
country: "Country",
gameOfChoice: "Game of Choice",
gameName: "Game Name",
bought: "Bought",
bankBalance: "Bank Balance",
extraInfo1: "Extra Info 1",
extraInfo2: "Extra Info 2",
rating: "Rating",
totalWinnings: "Total Winnings",
monthlyBreakdown: "Monthly Breakdown",
},
months: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
contextMenu: {
customMenuItem: "Custom Menu Item",
},
cellContent: {
abra: "Abra...",
cadabra: "...cadabra!",
noStars: "(No stars)",
empty: "(empty)",
},
colNames: [
"Station",
"Railway",
"Street",
"Address",
"Toy",
"Soft Box",
"Make and Model",
"Longest Day",
"Shortest Night",
],
countries: [
{ country: "Ireland", continent: "Europe", language: "English" },
{ country: "Spain", continent: "Europe", language: "Spanish" },
{ country: "United Kingdom", continent: "Europe", language: "English" },
{ country: "France", continent: "Europe", language: "French" },
{ country: "Germany", continent: "Europe", language: "German" },
{ country: "Luxembourg", continent: "Europe", language: "French" },
{ country: "Sweden", continent: "Europe", language: "Swedish" },
{ country: "Norway", continent: "Europe", language: "Norwegian" },
{ country: "Italy", continent: "Europe", language: "Italian" },
{ country: "Greece", continent: "Europe", language: "Greek" },
{ country: "Iceland", continent: "Europe", language: "Icelandic" },
{ country: "Portugal", continent: "Europe", language: "Portuguese" },
{ country: "Malta", continent: "Europe", language: "Maltese" },
{ country: "Brazil", continent: "South America", language: "Portuguese" },
{ country: "Argentina", continent: "South America", language: "Spanish" },
{ country: "Colombia", continent: "South America", language: "Spanish" },
{ country: "Peru", continent: "South America", language: "Spanish" },
{ country: "Venezuela", continent: "South America", language: "Spanish" },
{ country: "Uruguay", continent: "South America", language: "Spanish" },
{ country: "Belgium", continent: "Europe", language: "French" },
],
games: [
"Chess",
"Cross and Circle",
"Daldรธs",
"Downfall",
"DVONN",
"Fanorona",
"Game of the Generals",
"Ghosts",
"Abalone",
"Agon",
"Backgammon",
"Battleship",
"Blockade",
"Blood Bowl",
"Bul",
"Camelot",
"Checkers",
"Go",
"Gipf",
"Guess Who?",
"Hare and Hounds",
"Hex",
"Hijara",
"Isola",
"Janggi (Korean Chess)",
"Le Jeu de la Guerre",
"Patolli",
"Plateau",
"PรNCT",
"Rithmomachy",
"Sรกhkku",
"Senet",
"Shogi",
"Space Hulk",
"Stratego",
"Sugoroku",
"Tรขb",
"Tablut",
"Tantrix",
"Wari",
"Xiangqi (Chinese chess)",
"YINSH",
"ZรRTZ",
"Kalah",
"Kamisado",
"Liu po",
"Lost Cities",
"Mad Gab",
"Master Mind",
"Nine Men's Morris",
"Obsession",
"Othello",
],
firstNames: [
"Sophie",
"Isabelle",
"Emily",
"Olivia",
"Lily",
"Chloe",
"Isabella",
"Amelia",
"Jessica",
"Sophia",
"Ava",
"Charlotte",
"Mia",
"Lucy",
"Grace",
"Ruby",
"Ella",
"Evie",
"Freya",
"Isla",
"Poppy",
"Daisy",
"Layla",
],
lastNames: [
"Beckham",
"Black",
"Braxton",
"Brennan",
"Brock",
"Bryson",
"Cadwell",
"Cage",
"Carson",
"Chandler",
"Cohen",
"Cole",
"Corbin",
"Dallas",
"Dalton",
"Dane",
"Donovan",
"Easton",
"Fisher",
"Fletcher",
"Grady",
"Greyson",
"Griffin",
"Gunner",
"Hayden",
"Hudson",
"Hunter",
"Jacoby",
"Jagger",
"Jaxon",
"Jett",
"Kade",
"Kane",
"Keating",
"Keegan",
"Kingston",
"Kobe",
],
editorLanguages: [
"English",
"Spanish",
"French",
"Portuguese",
"German",
"Swedish",
"Norwegian",
"Italian",
"Greek",
"Icelandic",
"Portuguese",
"Maltese",
],
editorCountries: [
"Argentina",
"Brazil",
"Colombia",
"France",
"Germany",
"Greece",
"Iceland",
"Ireland",
"Italy",
"Malta",
"Portugal",
"Norway",
"Peru",
"Spain",
"Sweden",
"United Kingdom",
"Uruguay",
"Venezuela",
"Belgium",
"Luxembourg",
],
};
const ARABIC: LanguageConfig = {
localeText: AG_GRID_LOCALE_EG,
enableRtl: true,
headers: {
group: "ู
ุฌู
ูุนุฉ",
participant: "ุงูู
ุดุงุฑู",
name: "ุงูุงุณู
",
language: "ุงููุบุฉ",
languageTooltip: "ุชูู
ูุญ ู
ุซุงู ููุบุฉ",
country: "ุงูุจูุฏ",
gameOfChoice: "ุงููุนุจุฉ ุงูู
ูุถูุฉ",
gameName: "ุงุณู
ุงููุนุจุฉ",
bought: "ุชู
ุงูุดุฑุงุก",
bankBalance: "ุงูุฑุตูุฏ ุงูุจููู",
extraInfo1: "ู
ุนููู
ุงุช ุฅุถุงููุฉ 1",
extraInfo2: "ู
ุนููู
ุงุช ุฅุถุงููุฉ 2",
rating: "ุงูุชูููู
",
totalWinnings: "ุฅุฌู
ุงูู ุงูุฃุฑุจุงุญ",
monthlyBreakdown: "ุงูุชูุตูู ุงูุดูุฑู",
},
months: [
"ููุงูุฑ",
"ูุจุฑุงูุฑ",
"ู
ุงุฑุณ",
"ุฃุจุฑูู",
"ู
ุงูู",
"ููููู",
"ููููู",
"ุฃุบุณุทุณ",
"ุณุจุชู
ุจุฑ",
"ุฃูุชูุจุฑ",
"ูููู
ุจุฑ",
"ุฏูุณู
ุจุฑ",
],
contextMenu: {
customMenuItem: "ุนูุตุฑ ูุงุฆู
ุฉ ู
ุฎุตุต",
},
cellContent: {
abra: "ุฃุจุฑุง...",
cadabra: "...ูุงุฏุงุจุฑุง!",
noStars: "(ุจุฏูู ูุฌูู
)",
empty: "(ูุงุฑุบ)",
},
colNames: [
"ู
ุญุทุฉ",
"ุณูุฉ ุญุฏูุฏ",
"ุดุงุฑุน",
"ุนููุงู",
"ูุนุจุฉ",
"ุตูุฏูู",
"ุงูุดุฑูุฉ ูุงูุทุฑุงุฒ",
"ุฃุทูู ููู
",
"ุฃูุตุฑ ูููุฉ",
],
countries: [
{ country: "ุฃูุฑููุฏุง", continent: "ุฃูุฑูุจุง", language: "ุงูุฅูุฌููุฒูุฉ" },
{ country: "ุฅุณุจุงููุง", continent: "ุฃูุฑูุจุง", language: "ุงูุฅุณุจุงููุฉ" },
{ country: "ุงูู
ู
ููุฉ ุงูู
ุชุญุฏุฉ", continent: "ุฃูุฑูุจุง", language: "ุงูุฅูุฌููุฒูุฉ" },
{ country: "ูุฑูุณุง", continent: "ุฃูุฑูุจุง", language: "ุงููุฑูุณูุฉ" },
{ country: "ุฃูู
ุงููุง", continent: "ุฃูุฑูุจุง", language: "ุงูุฃูู
ุงููุฉ" },
{ country: "ูููุณู
ุจูุฑุบ", continent: "ุฃูุฑูุจุง", language: "ุงููุฑูุณูุฉ" },
{ country: "ุงูุณููุฏ", continent: "ุฃูุฑูุจุง", language: "ุงูุณููุฏูุฉ" },
{ country: "ุงููุฑููุฌ", continent: "ุฃูุฑูุจุง", language: "ุงููุฑููุฌูุฉ" },
{ country: "ุฅูุทุงููุง", continent: "ุฃูุฑูุจุง", language: "ุงูุฅูุทุงููุฉ" },
{ country: "ุงููููุงู", continent: "ุฃูุฑูุจุง", language: "ุงููููุงููุฉ" },
{ country: "ุฃูุณููุฏุง", continent: "ุฃูุฑูุจุง", language: "ุงูุฃูุณููุฏูุฉ" },
{ country: "ุงูุจุฑุชุบุงู", continent: "ุฃูุฑูุจุง", language: "ุงูุจุฑุชุบุงููุฉ" },
{ country: "ู
ุงูุทุง", continent: "ุฃูุฑูุจุง", language: "ุงูู
ุงูุทูุฉ" },
{
country: "ุงูุจุฑุงุฒูู",
continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ",
language: "ุงูุจุฑุชุบุงููุฉ",
},
{
country: "ุงูุฃุฑุฌูุชูู",
continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ",
language: "ุงูุฅุณุจุงููุฉ",
},
{
country: "ููููู
ุจูุง",
continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ",
language: "ุงูุฅุณุจุงููุฉ",
},
{ country: "ุจูุฑู", continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ", language: "ุงูุฅุณุจุงููุฉ" },
{ country: "ููุฒูููุง", continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ", language: "ุงูุฅุณุจุงููุฉ" },
{
country: "ุฃูุฑูุบูุงู",
continent: "ุฃู
ุฑููุง ุงูุฌููุจูุฉ",
language: "ุงูุฅุณุจุงููุฉ",
},
{ country: "ุจูุฌููุง", continent: "ุฃูุฑูุจุง", language: "ุงููุฑูุณูุฉ" },
],
games: [
"ุดุทุฑูุฌ",
"ุงูุฏุงุฆุฑุฉ ูุงูุตููุจ",
"ุฏุงูุฏูุณ",
"ุงูุณููุท",
"ุฏููู",
"ูุงููุฑููุง",
"ูุนุจุฉ ุงูุฌูุฑุงูุงุช",
"ุงูุฃุดุจุงุญ",
"ุฃุจุงููู",
"ุขุบูู",
"ุทุงููุฉ ุงูุฒูุฑ",
"ุณูููุฉ ุญุฑุจูุฉ",
"ุญุตุงุฑ",
"ุจููุฏ ุจูู",
"ุจูู",
"ูุงู
ูููุช",
"ุฏุงู
ุง",
"ุบู",
"ุบูุจู",
"ุงุญุฒุฑ ู
ูุ",
"ุงูุฃุฑูุจ ูุงูููุงุจ",
"ูููุณ",
"ููุฌุงุฑุง",
"ุฅูุฒููุง",
"ุฌุงูุบู (ุดุทุฑูุฌ ููุฑู)",
"ูุนุจุฉ ุงูุญุฑุจ",
"ุจุงุชููู",
"ุจูุงุชู",
"ุจูููุช",
"ุฑูุซู
ูู
ุงูู",
"ุณุงููู",
"ุณูููุช",
"ุดูุบู",
"ุณุจูุณ ูุงูู",
"ุณุชุฑุงุชูุบู",
"ุณูุบูุฑููู",
"ุทุงุจ",
"ุชุงุจููุช",
"ุชุงูุชุฑููุณ",
"ูุงุฑู",
"ุดูุงูุบุชุดู (ุดุทุฑูุฌ ุตููู)",
"ูููุด",
"ุฒูุฑุชุฒ",
"ูุงูุงู",
"ูุงู
ูุณุงุฏู",
"ููู ุจู",
"ุงูู
ุฏู ุงูู
ูููุฏุฉ",
"ู
ุงุฏ ุบุงุจ",
"ู
ุงุณุชุฑ ู
ุงููุฏ",
"ู
ุทุญูุฉ ุงูุฑุฌุงู ุงูุชุณุนุฉ",
"ููุณ",
"ุฃูุซููู",
],
firstNames: [
"ูุงุทู
ุฉ",
"ุนุงุฆุดุฉ",
"ู
ุฑูู
",
"ุฎุฏูุฌุฉ",
"ุฒููุจ",
"ููุฑ",
"ุณุงุฑุฉ",
"ูููู",
"ูุฏู",
"ุฃู
ููุฉ",
"ุฑูุง",
"ุฏุงูุง",
"ูุงุณู
ูู",
"ูู
ู",
"ุณูู
ู",
"ุฑูู
",
"ูุงูุฉ",
"ู
ูู",
"ุณู
ูุฑุฉ",
"ูุงุฏูุฉ",
"ุฑุดุง",
"ุณุญุฑ",
"ุฌูู",
],
lastNames: [
"ุฃุญู
ุฏ",
"ู
ุญู
ุฏ",
"ุนูู",
"ุญุณู",
"ุญุณูู",
"ุฅุจุฑุงููู
",
"ุฎุงูุฏ",
"ุนู
ุฑ",
"ููุณู",
"ุณุนูุฏ",
"ู
ุตุทูู",
"ุนุจุฏ ุงููู",
"ุงูุดุฑูู",
"ุงูู
ูุตูุฑ",
"ุงูุญููู
",
"ุงููุฌุงุฑ",
"ุงูุฎุทูุจ",
"ุงูุจูุฑู",
"ุงูุฒูุฑุงูู",
"ุงููุญุทุงูู",
"ุงูุนุชูุจู",
"ุงูุบุงู
ุฏู",
"ุงูุฏูุณุฑู",
"ุงูุดู
ุฑู",
"ุงูู
ุทูุฑู",
"ุงูุญุฑุจู",
"ุงูุณุจูุนู",
"ุงูุนูุฒู",
"ุงูุฑุดูุฏู",
"ุงูุจููู",
"ุงูุฌููู",
"ุงูู
ุงููู",
"ุงูุซุจูุชู",
"ุงูุฒูุฑุงุก",
"ุงูููุฏ",
"ุงูุณูู
ู",
"ุงูุญุงุฒู
ู",
],
editorLanguages: [
"ุงูุฅูุฌููุฒูุฉ",
"ุงูุฅุณุจุงููุฉ",
"ุงููุฑูุณูุฉ",
"ุงูุจุฑุชุบุงููุฉ",
"ุงูุฃูู
ุงููุฉ",
"ุงูุณููุฏูุฉ",
"ุงููุฑููุฌูุฉ",
"ุงูุฅูุทุงููุฉ",
"ุงููููุงููุฉ",
"ุงูุฃูุณููุฏูุฉ",
"ุงูุจุฑุชุบุงููุฉ",
"ุงูู
ุงูุทูุฉ",
],
editorCountries: [
"ุงูุฃุฑุฌูุชูู",
"ุงูุจุฑุงุฒูู",
"ููููู
ุจูุง",
"ูุฑูุณุง",
"ุฃูู
ุงููุง",
"ุงููููุงู",
"ุฃูุณููุฏุง",
"ุฃูุฑููุฏุง",
"ุฅูุทุงููุง",
"ู
ุงูุทุง",
"ุงูุจุฑุชุบุงู",
"ุงููุฑููุฌ",
"ุจูุฑู",
"ุฅุณุจุงููุง",
"ุงูุณููุฏ",
"ุงูู
ู
ููุฉ ุงูู
ุชุญุฏุฉ",
"ุฃูุฑูุบูุงู",
"ููุฒูููุง",
"ุจูุฌููุง",
"ูููุณู
ุจูุฑุบ",
],
};
const HEBREW: LanguageConfig = {
localeText: AG_GRID_LOCALE_IL,
enableRtl: true,
headers: {
group: "ืงืืืฆื",
participant: "ืืฉืชืชืฃ",
name: "ืฉื",
language: "ืฉืคื",
languageTooltip: "ืชืืืืจ ืืืืืื ืขืืืจ ืฉืคื",
country: "ืืืื ื",
gameOfChoice: "ืืฉืืง ืืืขืืฃ",
gameName: "ืฉื ืืืฉืืง",
bought: "ื ืจืืฉ",
bankBalance: "ืืชืจืช ืื ืง",
extraInfo1: "ืืืืข ื ืืกืฃ 1",
extraInfo2: "ืืืืข ื ืืกืฃ 2",
rating: "ืืืจืื",
totalWinnings: "ืกืืดื ืืืืืช",
monthlyBreakdown: "ืคืืจืื ืืืืฉื",
},
months: [
"ืื ืืืจ",
"ืคืืจืืืจ",
"ืืจืฅ",
"ืืคืจืื",
"ืืื",
"ืืื ื",
"ืืืื",
"ืืืืืกื",
"ืกืคืืืืจ",
"ืืืงืืืืจ",
"ื ืืืืืจ",
"ืืฆืืืจ",
],
contextMenu: {
customMenuItem: "ืคืจืื ืชืคืจืื ืืืชืื",
},
cellContent: {
abra: "...ืืืจื",
cadabra: "!ืืืืจื...",
noStars: "(ืืื ืืืืืื)",
empty: "(ืจืืง)",
},
colNames: [
"ืชืื ื",
"ืจืืืช",
"ืจืืื",
"ืืชืืืช",
"ืฆืขืฆืืข",
"ืงืืคืกื",
"ืืฆืจื ืืืื",
"ืืืื ืืืจืื",
"ืืืืื ืืงืฆืจ",
],
countries: [
{ country: "ืืืจืื ื", continent: "ืืืจืืคื", language: "ืื ืืืืช" },
{ country: "ืกืคืจื", continent: "ืืืจืืคื", language: "ืกืคืจืืืช" },
{ country: "ืืจืืื ืื", continent: "ืืืจืืคื", language: "ืื ืืืืช" },
{ country: "ืฆืจืคืช", continent: "ืืืจืืคื", language: "ืฆืจืคืชืืช" },
{ country: "ืืจืื ืื", continent: "ืืืจืืคื", language: "ืืจืื ืืช" },
{ country: "ืืืงืกืืืืจื", continent: "ืืืจืืคื", language: "ืฆืจืคืชืืช" },
{ country: "ืฉืืืืื", continent: "ืืืจืืคื", language: "ืฉืืืืืช" },
{ country: "ื ืืจืืืืื", continent: "ืืืจืืคื", language: "ื ืืจืืืืืช" },
{ country: "ืืืืืื", continent: "ืืืจืืคื", language: "ืืืืืงืืช" },
{ country: "ืืืื", continent: "ืืืจืืคื", language: "ืืืื ืืช" },
{ country: "ืืืกืื ื", continent: "ืืืจืืคื", language: "ืืืกืื ืืืช" },
{ country: "ืคืืจืืืื", continent: "ืืืจืืคื", language: "ืคืืจืืืืืืช" },
{ country: "ืืืื", continent: "ืืืจืืคื", language: "ืืืืืืช" },
{ country: "ืืจืืื", continent: "ืืจืื ืืืจืืงื", language: "ืคืืจืืืืืืช" },
{ country: "ืืจืื ืืื ื", continent: "ืืจืื ืืืจืืงื", language: "ืกืคืจืืืช" },
{ country: "ืงืืืืืืื", continent: "ืืจืื ืืืจืืงื", language: "ืกืคืจืืืช" },
{ country: "ืคืจื", continent: "ืืจืื ืืืจืืงื", language: "ืกืคืจืืืช" },
{ country: "ืื ืฆืืืื", continent: "ืืจืื ืืืจืืงื", language: "ืกืคืจืืืช" },
{ country: "ืืืจืืืืืื", continent: "ืืจืื ืืืจืืงื", language: "ืกืคืจืืืช" },
{ country: "ืืืืื", continent: "ืืืจืืคื", language: "ืฆืจืคืชืืช" },
],
games: [
"ืฉืืื",
"ืขืืืื ืืฆืื",
"ืืืืืก",
"ืืคืืืช",
"ืืืื",
"ืคื ืืจืื ื",
"ืืฉืืง ืืื ืจืืื",
"ืจืืืืช",
"ืืืืื",
"ืืืื",
"ืฉืฉ-ืืฉ",
"ืกืคืื ืืช ืงืจื",
"ืืฆืืจ",
"ืืืื ืืืื",
"ืืื",
"ืงืืืื",
"ืืืงื",
"ืื",
"ืืืคืฃ",
"ื ืืฉ ืื?",
"ืืจื ื ืืืืืื",
"ืืงืก",
"ืืืืณืืจื",
"ืืืืืื",
"ืืณืื ืื (ืฉืืื ืงืืจืืื ื)",
"ืืฉืืง ืืืืืื",
"ืคืืืื",
"ืคืืืื",
"ืคืื ืงื",
"ืจืืชืืืืืื",
"ืกืืืงื",
"ืกื ื",
"ืฉืืื",
"ืกืคืืืก ืืืืง",
"ืกืืจืืื",
"ืกืืืืจืืงื",
"ืืื",
"ืืืืื",
"ืื ืืจืืงืก",
"ืืืจื",
"ืฉืืื ืืฆืณื (ืฉืืื ืกืื ื)",
"ืืื ืฉ",
"ืืจืืฅ",
"ืงืื",
"ืงืืืกืื",
"ืืื ืคื",
"ืขืจืื ืืืืืืช",
"ืื ืืื",
"ืืืกืืจ ืืืื ื",
"ืืื ืช ืชืฉืขื",
"ืืืืกืกืื",
"ืืืชืื",
],
firstNames: [
"ื ืืขื",
"ืชืืจ",
"ืฉืืจื",
"ืืขื",
"ืืืื",
"ืจืื",
"ืื ื",
"ืืืจื",
"ืืืื",
"ืืืืช",
"ืืืื",
"ืจืื ืืช",
"ืขืื",
"ืฉืจื",
"ืืืืืื",
"ืืจืื",
"ืจืืงื",
"ืืื",
"ืื ื",
"ืืกืชืจ",
"ืืืืช",
"ืขื ืช",
"ืืื",
],
lastNames: [
"ืืื",
"ืืื",
"ืืืจืื",
"ืคืจืฅ",
"ืืืืื",
"ืืื",
"ืืืจืื",
"ืคืจืืืื",
"ืฉืคืืจื",
"ืืืืืืจื",
"ืจืืื ืืจื",
"ืืจืงืืืืฅ",
"ืืืื",
"ืฉืืื",
"ืืืกืฃ",
"ืืื",
"ืืืื",
"ืืืื",
"ืืืืืื",
"ืืืื",
"ืืืืืื",
"ืฉืืขืื",
"ืื ืืืื",
"ืืืืื",
"ืืจืืื",
"ืืจืื ืืจื",
"ืืจืฉืงืืืืฅ",
"ืฉืืจื ืืจื",
"ืืืื ืฉืืืื",
"ืืืืืจืื",
"ืงืคืื",
"ืืจื ืฉืืืื",
"ืจืืื ืื",
"ืืืืืฉืืืื",
"ืืืคืจืื",
"ืืืืืืืฅ",
"ืคืื ืงืืฉืืืื",
],
editorLanguages: [
"ืื ืืืืช",
"ืกืคืจืืืช",
"ืฆืจืคืชืืช",
"ืคืืจืืืืืืช",
"ืืจืื ืืช",
"ืฉืืืืืช",
"ื ืืจืืืืืช",
"ืืืืืงืืช",
"ืืืื ืืช",
"ืืืกืื ืืืช",
"ืคืืจืืืืืืช",
"ืืืืืืช",
],
editorCountries: [
"ืืจืื ืืื ื",
"ืืจืืื",
"ืงืืืืืืื",
"ืฆืจืคืช",
"ืืจืื ืื",
"ืืืื",
"ืืืกืื ื",
"ืืืจืื ื",
"ืืืืืื",
"ืืืื",
"ืคืืจืืืื",
"ื ืืจืืืืื",
"ืคืจื",
"ืกืคืจื",
"ืฉืืืืื",
"ืืจืืื ืื",
"ืืืจืืืืืื",
"ืื ืฆืืืื",
"ืืืืื",
"ืืืงืกืืืืจื",
],
};
export const LANGUAGES: Record<string, LanguageConfig> = {
english: ENGLISH,
arabic: ARABIC,
hebrew: HEBREW,
};
// Flag lookup keyed by the English country name. Placed on `gridOptions.context` so every framework's
// CountryCellRenderer reads it identically. Flags therefore resolve in English mode; the localised
// Arabic/Hebrew country names have no entry, so the renderer shows the name without a flag.
export const COUNTRY_CODES: Record<string, string> = {
Ireland: "ie",
Luxembourg: "lu",
Belgium: "be",
Spain: "es",
"United Kingdom": "gb",
France: "fr",
Germany: "de",
Sweden: "se",
Italy: "it",
Greece: "gr",
Iceland: "is",
Portugal: "pt",
Malta: "mt",
Norway: "no",
Brazil: "br",
Argentina: "ar",
Colombia: "co",
Peru: "pe",
Venezuela: "ve",
Uruguay: "uy",
};
const BOOLEAN_VALUES = [true, "true", false, "false"];
// Builds the example's row data for a language synchronously. Shared by every framework variant so the
// grids render identical data; the deterministic pseudo-random seed is reset on each call.
export function createRowData(languageKey: string): any[] {
const lang = LANGUAGES[languageKey];
const rowCount = 100;
let seed = 123456789;
const m = Math.pow(2, 32);
const a = 1103515245;
const c = 12345;
const pseudoRandom = () => {
seed = (a * seed + c) % m;
return seed / m;
};
const data: any[] = [];
for (let row = 0; row < rowCount; row++) {
const rowItem: any = {};
const countries = lang.countries;
const countriesToPickFrom = Math.floor(
countries.length * (((row % 3) + 1) / 3),
);
const countryData = countries[(row * 19) % countriesToPickFrom];
rowItem.country = countryData.country;
rowItem.continent = countryData.continent;
rowItem.language = countryData.language;
const firstName = lang.firstNames[row % lang.firstNames.length];
const lastName = lang.lastNames[row % lang.lastNames.length];
rowItem.name = firstName + " " + lastName;
rowItem.game = {
name: lang.games[Math.floor(((row * 13) / 17) * 19) % lang.games.length],
bought: BOOLEAN_VALUES[row % BOOLEAN_VALUES.length],
};
rowItem.bankBalance = Math.round(pseudoRandom() * 10000000) / 100 - 3000;
rowItem.rating = Math.round(pseudoRandom() * 5);
let totalWinnings = 0;
for (let i = 0, len = lang.months.length; i < len; ++i) {
const value = Math.round(pseudoRandom() * 10000000) / 100 - 20;
rowItem["month_" + i] = value;
totalWinnings += value;
}
rowItem.totalWinnings = totalWinnings;
data.push(rowItem);
}
return data;
}
import '@angular/compiler';
import { provideHttpClient } from '@angular/common/http';
import { enableProdMode } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
if (new URLSearchParams(window.location.search).get('prod') !== 'false') {
enableProdMode();
}
const app = bootstrapApplication(AppComponent, {
providers: [provideHttpClient()],
});
How it Works Copy Link
If you are creating your own theme, knowing how the RTL is implemented will be useful.
CSS Styling Copy Link
The following CSS classes are added to the grid when RTL is on and off:
- ag-rtl: Added when RTL is ON. It sets the style
'direction=rtl'. - ag-ltr: Added when RTL is OFF. It sets the style
'direction=ltr'.
You can see these classes by inspecting the DOM of AG Grid. A lot of the layout of the grid is reversed with this simple CSS class change.
Themes then also use these styles for adding different values based on whether RTL is used or NOT. For example, the following is used inside the provided themes:
// selection checkbox gets 4px padding to the RIGHT when LTR
.ag-ltr .ag-selection-checkbox {
padding-right 4px;
}
// selection checkbox gets 4px padding to the LEFT when RTL
.ag-rtl .ag-selection-checkbox {
padding-left 4px;
} Pinning and Scroll Bars Copy Link
Under normal operation, when columns are pinned to the right, the vertical scroll will appear alongside the right pinned panel. For RTL the scroll will appear on the left pinned panel when left pinning columns.
Layout of Columns Copy Link
The grid normally lays the columns out from left to right. When doing RTL the columns go from the right to the left. If the grid was using normal HTML layout, then the columns would all reverse by themselves, however the grid used Column Visualisation, so it needs to know exactly where each column is. Hence there is a lot of math logic inside AG Grid that is tied with the scrolling. Not only is the scrolling inverted, all the maths logic is inverted also. All of this is taken care of for you inside AG Grid. Once enableRtl=true is set, the grid will know to use the RTL variant of all the calculations.