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)

Below is an example for Korean. File location (language/korean/index.php)

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.

Last updated