miniCal
Search…
⌃K

language

Language folder contains subfolders of languages, each language subfolder will contain an index.php file, this file will have an array of words.
language
|->english
|->index.php
|->korean
|->index.php
|->portuguese
|->index.php
$lang array key will have the like [extension_folder_name][keyword] and for value translation of the keyword. Here is an example for English.
File location (language/english/index.php)
index.php
<?php
$lang['minical-extension-boilerplate']['booking list'] = 'Booking List';
$lang['minical-extension-boilerplate']['booking_id'] = 'Booking ID';
$lang['minical-extension-boilerplate']['room_number'] = 'Room Number';
$lang['minical-extension-boilerplate']['check_in_date'] = 'Check-In Date';
$lang['minical-extension-boilerplate']['check_out_date'] = 'Check-Out Date';
$lang['minical-extension-boilerplate']['customer_name'] = 'Customer Name';
$lang['minical-extension-boilerplate']['no_bookings_found'] = 'No Booking Found';
?>
Below is an example for Portuguese. File location (language/portuguese/index.php)
index.php
<?php
$lang['minical-extension-boilerplate']['booking list'] = 'lista de reservas';
$lang['minical-extension-boilerplate']['booking_id'] = 'ID de reserva';
$lang['minical-extension-boilerplate']['room_number'] = 'Número do quarto';
$lang['minical-extension-boilerplate']['check_in_date'] = 'Data de Check-In';
$lang['minical-extension-boilerplate']['check_out_date'] = 'Data de Check-Out';
$lang['minical-extension-boilerplate']['customer_name'] = 'Nome do Cliente';
$lang['minical-extension-boilerplate']['no_bookings_found'] = 'Nenhuma reserva encontrada';
?>
Below is an example for Korean. File location (language/korean/index.php)
index.php
<?php
$lang['minical-extension-boilerplate']['booking list'] = '예약 목록';
$lang['minical-extension-boilerplate']['booking_id'] = '예약 ID';
$lang['minical-extension-boilerplate']['room_number'] = '방 번호';
$lang['minical-extension-boilerplate']['check_in_date'] = '체크인 날짜';
$lang['minical-extension-boilerplate']['check_out_date'] = '체크 아웃 날짜';
$lang['minical-extension-boilerplate']['customer_name'] = '고객 이름';
$lang['minical-extension-boilerplate']['no_bookings_found'] = '예약을 찾을 수 없습니다';
?>

How to display keywords

For displaying any keyword in extension, keyword should be concatenated with extension folder name with '/' for example 'minical-extension-boilerplate/name' pass this string to l() function like l('minical-extension-boilerplate/name', true) Below other example has given for it.
<?php echo l('minical-extension-boilerplate/booking_id', true);?>
<?php echo l('minical-extension-boilerplate/room_number', true);?>
Last modified 11mo ago