File: localization.json

Recommend this page to a friend!
  Classes of Aleksey Nemiro  >  PHP ASP.NET WebForms  >  localization.json  >  Download  
File: localization.json
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP ASP.NET WebForms
Emulation of ASP.NET WebForms engine in PHP
Author: By
Last change:
Date: 4 years ago
Size: 4,190 bytes
 

Contents

Download
[
	{ "Key": "PageTitle", "Value": "Site localization" },
	{ "Key": "HeaderTitle", "Value": "Localization" },
	{ "Key": "HeaderDescription", "Value": "Built-in localization mechanisms make it easy to adapt the site for different cultures." },
	{ "Key": "IntroductionText1", "Value": "<strong>WebForms.PHP</strong> engine has built-in mechanisms for localization." },
	{ "Key": "IntroductionText2", "Value": "There are two levels of localization: global and local." },
	{ "Key": "IntroductionText3", "Value": "Global level applies to the entire site. Powers of the local level apply only to a specific page." },
	{ "Key": "IntroductionText4", "Value": "For localization resource files used in <strong>JSON</strong> format." },
	{ "Key": "IntroductionText5", "Value": "The resource file names must contain the code of culture (language). Culture code - this is the standard two-letter language code. For example: ru, en. If the name of the resource file does not contain the code of culture, it's such a file is considered the default file." },
	{ "Key": "IntroductionText6", "Value": "Loading resource files in the following sequence: <storng>global.json</strong>, global resource of the current culture, default local resource file and local file of the current culture. The upper keys can overwrite the key values of the lower level." },
	{ "Key": "IntroductionText7", "Value": "The values of key resources may contain keys other resources, but no deeper than one level." },
	{ "Key": "StructureOfTheFileNames", "Value": "Structure of file names" },
	{ "Key": "StructureOfTheFileNamesText1", "Value": "For local resource file names must match the name of the page file, excluding extension." },
	{ "Key": "StructureOfTheFileNamesText2", "Value": "For example, for <strong>index.php</strong> resource file by default <strong>index.json</strong>; for page <strong>users.php</strong> - <strong>users.json</strong> etc." },
	{ "Key": "StructureOfTheFileNamesText3", "Value": "For global resource file is used <strong>global.json</strong>." },
	{ "Key": "StructureOfTheFileNamesText4", "Value": "If the resource file for a particular culture (language), the file name must contain the code of this culture. For example, esource file for the Russian language of the <strong>index.php</strong> should be named <strong>index.ru.json</strong>, for English - <strong>index.en.json</strong> etc. Similarly for global resources: <strong>global.ru.json</strong>, <strong>global.en.json</strong> etc." },
	{ "Key": "StructureOfTheFileNamesText5", "Value": "The list of two-letter language code (<strong>ISO 639-1</strong>) can be found at the following link: <a href=\"http://www.loc.gov/standards/iso639-2/php/code_list.php\">http://www.loc.gov/standards/iso639-2/php/code_list.php</a>" },
	{ "Key": "StructureOfFiles", "Value": "Structure of localization files" },
	{ "Key": "StructureOfFilesText1", "Value": "Resource files are plain text files in the <strong>JSON</strong> format." },
	{ "Key": "StructureOfFilesText2", "Value": "To eliminate errors is recommended to use the <strong>UTF-8</strong> without <strong>BOM</strong>." },
	{ "Key": "StructureOfFilesText3", "Value": "Resource files contain arrays of resource elements." },
	{ "Key": "StructureOfFilesText4", "Value": "Each element of the resource is written to the object of the following structure: <code>{ \"Key\": \"Resource name\", \"Value\":  \"Resource value\" }</code>" },
	{ "Key": "StructureOfFilesText5", "Value": "Below is an example of the resource file." },
	{ "Key": "StructureOfFilesText6", "Value": "Title" },
	{ "Key": "StructureOfFilesText7", "Value": "The file structure must conform to generally accepted standards of the <strong>JSON</strong>." },
	{ "Key": "ResourseUsage", "Value": "Using the resources localization" },
	{ "Key": "ResourseUsageText1", "Value": "To use the resources sufficient to indicate in the text of key resource format: <code>${RourceKey}</code>." },
	{ "Key": "ResourseUsageText2", "Value": "For examle, for rosource key <code>ThePageTitle</code>, on the page you must place the marker: <code>${ThePageTitle}</code>, for <code>TheIntroduction</code> - <code>${TheIntroduction}</code> etc." }
]

For more information send a message to info at phpclasses dot org.