Example of using gettext in PHP to solve international problems (i18n ). There are many ways to achieve internationalization. many PHP frameworks have built-in i18n support, but most of them are implemented based on PHP arrays. this method is not
There are many ways to internationalize, many PHP frameworks have built-in i18n support, but most are implemented in PHP-based arrays, and this method is not recommended. The most popular and most common method is gettext.
Gettext is used for
Php program internationalization implementation method (using gettext ). Step 1: Set up environment 1. first check whether the php_gettext.dll file exists in your php extension directory. if not, you need to download one or copy one from other
Use gettext in PHP to support multi-language methods. Today, we use a simple example to describe the usage of getText in PHP (getText is a series of tools and library functions that help programmers and translators develop multilingual software ),
Step One: Build the environment
1, first check your PHP extension directory if there is php_gettext.dll this file, if not, this will require you
Download one or copy it from somewhere else and put it in the PHP extensions directory.
2, open php.ini,
First, the use of GetText, because Smarty have the corresponding GetText plug-in, so directly with the plug-in
The steps are as follows:
1.1 Add the following code to the common include file:
$domain _info[' Lang '] is the language set
Recently, with the gradual standardization of i18n, I also talk about how to achieve internationalization support in PHP. As with other programming languages, the GetText Suite writing i18n program can be used in PHP to implement NLS (Native
Compiling a tutorial on Mac OS to install the NGINX+PHP+MARIADB development environment, NGINXMARIADB
Because of the urine nature of Oracle. MARIADB should have replaced MySQL. So abandon MySQL.
1, compile NginxDownload Nginx,openssl,pcre
Cacti Monitoring Server configuration tutorial (based on centos+nginx+mysql+php Environment building)Specific cases:LAN has two hosts, a Linux, a Windows, now need to configure a cacti monitoring server to monitor the two hostsEnvironment
PHP-FPM for performance optimization and PHP-FPM performance optimization
Brief introduction:
PHP-FPM is a PHP FastCGI manager, General Nginx above the PHP program will throw PHP program to PHP-FPM to parse. All right, that's it!
PHP 5.4 began to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.