Difference between revisions of "App languages.php"
(→To do list) |
(→To do list) |
||
Line 6: | Line 6: | ||
* <strike>time_conditions</strike> - COMPLETE (rinor) | * <strike>time_conditions</strike> - COMPLETE (rinor) | ||
− | |||
* <strike>conferences active</strike> - COMPLETE (soapee01) | * <strike>conferences active</strike> - COMPLETE (soapee01) | ||
* <strike>content</strike> - COMPLETE (soapee01) | * <strike>content</strike> - COMPLETE (soapee01) | ||
Line 13: | Line 12: | ||
* <strike>exec</strike> - COMPLETE (soapee01) | * <strike>exec</strike> - COMPLETE (soapee01) | ||
* <strike>log_viewer</strike> - COMPLETE (soapee01) | * <strike>log_viewer</strike> - COMPLETE (soapee01) | ||
− | |||
* <strike>traffic graph</strike> - COMPLETE (SVG excluded) | * <strike>traffic graph</strike> - COMPLETE (SVG excluded) | ||
* <strike>app/users</strike> was already done. | * <strike>app/users</strike> was already done. | ||
Line 20: | Line 18: | ||
* <strike>gateways</strike> - COMPLETE (mcrane) | * <strike>gateways</strike> - COMPLETE (mcrane) | ||
* <strike>extensions</strike> - COMPLETE | * <strike>extensions</strike> - COMPLETE | ||
+ | |||
+ | |||
+ | * xmpp | ||
* dialplan | * dialplan | ||
* destinations | * destinations | ||
Line 26: | Line 27: | ||
* hardware_phones | * hardware_phones | ||
* call_center | * call_center | ||
+ | * call center active | ||
* ivr_menu | * ivr_menu | ||
* modules | * modules |
Revision as of 16:58, 4 May 2013
The app_languages.php is an array of all the words, phrases and sentences used in the project.
To do list
All of them need to be done the highest priority ones cannot be automated. The lowest priority are ones that I can automate some of it.
-
time_conditions- COMPLETE (rinor) -
conferences active- COMPLETE (soapee01) -
content- COMPLETE (soapee01) -
dialplan inbound- COMPLETE (rinor) -
dialplan outbound- COMPLETE (soapee01) -
exec- COMPLETE (soapee01) -
log_viewer- COMPLETE (soapee01) -
traffic graph- COMPLETE (SVG excluded) -
app/userswas already done. -
music_on_hold- COMPLETE (soapee01) -
click_to_call- COMPLETE (soapee01) -
gateways- COMPLETE (mcrane) -
extensions- COMPLETE
- xmpp
- dialplan
- destinations
- contacts
- call_flows
- hardware_phones
- call_center
- call center active
- ivr_menu
- modules
- hot_desking
- sip_profiles
- hunt_groups
- sql_query
- fifo
- fifo_list
- vars
- virtual tables
- core/apps
- core/backaup
- core/databases
- core/default_settings
- core/domains
- core/menu
- core/upgrade
- core/user
- grammar_edit (assigned to mark)
- php_edit (assigned to mark)
- xml edit (assigned to mark)
- provision_editor (assigned to mark)
Recently Completed
- recordings - soapee01
- registrations - soapee01
- ring_groups - soapee01
- script_edit - soapee01
- services - soapee01
- settings - soapee01
- sip_status - soapee01
- voicemail_msgs
- voicemail_status - soapee01
- voicemail_greetings
- xml_cdr
- and more...
Guidelines
The words used in the text variable name
- separated with a dash.
- begin with a prefix
- are lower case
Prefixes
- title - the title of the page
- description - information to describe the page or an item on the page
- button - the label for the buttons
- confirm - a message used to confirm and action like delete
- label - the label for items on the page
Languages
Each word, phrase, or sentence has the language declared with the 2 language code with s dash seperating the region. There is one difference the region is entirely in lower case. For additional information see the following.
http://www.w3.org/International/articles/language-tags/
http://www.iana.org/assignments/language-subtag-registry
- en-us
- es-mx
- de-ch
- de-at
- fr-ca
- fr-ch
- pt-pt
- pt-br
Example File
An excerpt from the app_languages.php for Conference Center.
<?php $text['title-conference-center']['en-us'] = 'Conference Center'; $text['title-conference-center']['pt-pt'] = ; $text['description-conference-center']['en-us'] = 'Conference Center is used to setup one or more conference rooms with a name, extension number, a required pin number length, and a description.'; $text['description-conference-center']['pt-pt'] = ; $text['label-name']['en-us'] = 'Name'; $text['label-name']['pt-pt'] = ; $text['label-extension']['en-us'] = 'Extension'; $text['label-extension']['pt-pt'] = ; $text['label-delete']['en-us'] = 'Delete'; $text['label-delete']['pt-pt'] = ; $text['label-edit']['en-us'] = 'Edit'; $text['label-edit']['pt-pt'] = ; $text['button-view']['en-us'] = 'View'; $text['button-view']['pt-pt'] = ; $text['button-back']['en-us'] = 'Back'; $text['button-back']['pt-pt'] = 'Voltar'; $text['confirm-update']['en-us'] = 'Update Complete'; $text['confirm-update']['pt-pt'] = 'Actualização Completa'; $text['confirm-delete']['en-us'] = 'Do you really want to delete this?'; $text['confirm-delete']['pt-pt'] = ; $text['button-add']['en-us'] = 'Add'; $text['button-add']['pt-pt'] = ; $text['button-save']['en-us'] = 'Save'; $text['button-save']['pt-pt'] = 'Guardar'; ?>
To use inside the code on each page that displays text. Place the following code at the top just after the permision_exists
//add multi-lingual support require_once "app_languages.php"; foreach($text as $key => $value) { $text[$key] = $value[$_SESSION['domain']['language']['code']]; }
To place a word, phrase or sentence it would be used in the code like the following example.
echo "<td align='left' width='30%' nowrap='nowrap'>".$text['title-conference-centers']."</td>\n";
An additional example.
echo " <tr>\n"; echo " <td align='left' colspan='2'>\n"; echo " ".$text['description-conference-centers']."\n"; echo " </td>\n"; echo " </tr>\n"; echo "</table>\n";