Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Internationalisation and my PHP Development Infrastructure

By Tony Marston
2005-07-17


My Implementation - File Names

Within the 'help' directory there will be a separate file for each PHP script with the suffix '.help.txt'. For example, the script 'person_list.php' will have 'person_list.php.help.txt'. In my full development infrastructure I will use the task_id instead od the script_id.

Within the 'screens' subdirectory there will be a separate file for each screen structure with the suffix '.screen.inc'.

Within the 'text' subdirectory there will be the following files:

  1. A file called 'language_text.inc' that will contain all the translations for that application in that language.
  2. A file called 'language_array.inc' that will contain all the arrays of values that are normally used in picklists (dropdown lists or radio groups) where the key (as referenced internally) remains consistent, but where the value (as seen by the user) may be expressed in different languages.

For each installation there will also be a 'sys.language_text.inc' and 'sys.language_array.inc' to contain all the translatable text required by the system libraries. In the sample application these will reside in the 'sample/text/' directory, but in my full infrastructure these will reside in the 'menu/text/' directory. These 'system' files contains the text that may be used by any of the system libraries (controller scripts, validation class, generic table class and DML class) regardless of the application in which any paricular component belongs.

This means that:

  • Each application subsystem will have its own version of 'language_text.inc' and 'language_array.inc' to contain the language text for that application. It is not necessary (nor even advisable) to have all the text for all languages for all application subsystems in a single file.
  • Each installation, which may consist of any number of application subsystems, will have a single copy of 'sys.language_text.inc' and 'sys.language_array.inc'. That is because there is only a single copy of all the system libraries.


Tutorial Pages:
» Introduction
» Possible Methods
» Design Decisions
» My Implementation - Directory Structure
» My Implementation - File Names
» My Implementation - Determine User Language
» My Implementation - Locate Language Subdirectory
» My Implementation - Load Screen Structure file
» My Implementation - Get Language Text
» My Implementation - Get Language Array
» My Implementation - Handling Dates
» My Implementation - Handling Numbers
» Conclusion
» References


 | Bookmark
Related Tutorials:
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» PHP Site Search Made Easy
» Installing and Configuring Drupal 6.1
» Desktop Application Development with PHP-GTK

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources