Table of Contents
grammar
parameter
return
Example
Home Backend Development PHP Tutorial nl_langinfo() function in PHP

nl_langinfo() function in PHP

Aug 30, 2023 pm 07:45 PM
php programming language Multi-language support nl_langinfo (built-in function in php)

nl_langinfo() function in PHP

nl_langinfo() function contains information about language and locale settings.

Note - This function does not work on Windows.

grammar

nl_langinfo(ele)
Copy after login

parameter

  • ele - Specifies the element to be returned. Should be any of the following elements -

    • Time and Calendar −

    • ABDAY_(1-7) - Abbreviated name for the numbered day of the week

    • DAY_(1-7) - Name of the numbered day of the week (DAY_1 = Sunday)

    • ABMON_(1-12) - Abbreviated month name of the year

    • MON_(1-12) - The name of the numbered month of the year

    • AM_STR - AM string

    • PM_STR - Afternoon

    • D_T_FMT - Can be used as a format string for strftime() to represent time and date

    • D_FMT - A string that can be used as a format string for strftime() to represent a date

    • T_FMT - Can be used as a format string for strftime() to represent time

    • T_FMT_AMPM - Can be used as a format string for strftime() to represent 12-hour time, including AM/PM

    • ERA - The Alternative Era

    • ERA_YEAR - Year in alternate era format

    • ERA_D_T_FMT - Alternate era format for dates and times (strings that can be used in strftime())

    • ERA_D_FMT - Date in alternative epoch format (a string that can be used in strftime())

    • ERA_T_FMT - Time expressed in alternative era format (a string that can be used in strftime())

    • Currency Category −

    • INT_CURR_SYMBOL - Currency symbol (example: USD)

    • CURRENCY_SYMBOL - Currency symbol (example: $)

    • CRNCYSTR - Same as CURRENCY_SYMBOL

    • MON_DECIMAL_POINT - Currency decimal point character

    • MON_THOUSANDS_SEP - Currency thousandth separator

    • POSITIVE_SIGN - Positive character

    • NEGATIVE_SIGN - negative character

    • MON_GROUPING - Array showing how currency numbers are grouped (for example: 1 000 000)

    • INT_FRAC_DIGITS - International decimal places

    • FRAC_DIGITS - local decimal places

    • P_CS_PRECEDES - True (1) if the currency symbol precedes a positive value; False (0) if it follows a positive value

    • P_SEP_BY_SPACE - True (1) if there is a space between the currency symbol and the positive value, False (0) otherwise

    • N_CS_PRECEDES - True (1) if the currency symbol is placed before the negative value, False (0) if it is placed after it

    • N_SEP_BY_SPACE - True (1) if there is a space between the currency symbol and the negative value, False (0) otherwise

    • P_SIGN_POSN - Format settings. Possible return values ​​−

      • 0 - Brackets enclose the quantity and currency symbol

      • 1 - The symbol string is placed before the quantity and currency symbol

      • 2 - The symbol string is placed after the quantity and currency symbols

      • 3 - The symbol string immediately precedes the currency symbol

      • 4 - The symbol string immediately follows the currency symbol

    • N_SIGN_POSN - Format settings. Possible return values ​​−

      • 0 - Brackets enclose the quantity and currency symbol

      • 1 - The symbol string is placed before the quantity and currency symbol

      • 2 - The symbol string is placed after the quantity and currency symbols

      • 3 - The symbol string immediately precedes the currency symbol

      • 4 - The symbol string immediately follows the currency symbol

      Number Category −

    • DECIMAL_POINT - Decimal point character

    • RADIXCHAR - Same as DECIMAL_POINT

    • THOUSANDS_SEP - thousands separator character

    • THOUUSEP - Same as THOUSANDS_SEP

    • GROUPING - Array showing how numbers are grouped

return

nl_langinfo() function returns specific information on success, otherwise returns FALSE.

The Chinese translation of

Example

is:

Example

This function cannot be implemented on Windows platform.

The above is the detailed content of nl_langinfo() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of internationalization processing and multi-language support of Gin framework Detailed explanation of internationalization processing and multi-language support of Gin framework Jun 22, 2023 am 10:06 AM

The Gin framework is a lightweight web framework that is characterized by speed and flexibility. For applications that need to support multiple languages, the Gin framework can easily perform internationalization processing and multi-language support. This article will elaborate on the internationalization processing and multi-language support of the Gin framework. Internationalization During the development process, in order to take into account users of different languages, it is necessary to internationalize the application. Simply put, internationalization processing means appropriately modifying and adapting the resource files, codes, texts, etc.

Use the Gin framework to implement internationalization and multi-language support functions Use the Gin framework to implement internationalization and multi-language support functions Jun 23, 2023 am 11:07 AM

With the development of globalization and the popularity of the Internet, more and more websites and applications have begun to strive to achieve internationalization and multi-language support functions to meet the needs of different groups of people. In order to realize these functions, developers need to use some advanced technologies and frameworks. In this article, we will introduce how to use the Gin framework to implement internationalization and multi-language support capabilities. The Gin framework is a lightweight web framework written in Go language. It is efficient, easy to use and flexible, and has become the preferred framework for many developers. besides,

Achieve multi-language support and international applications through Spring Boot Achieve multi-language support and international applications through Spring Boot Jun 23, 2023 am 09:09 AM

With the development of globalization, more and more websites and applications need to provide multi-language support and internationalization functions. For developers, implementing these functions is not an easy task because it requires consideration of many aspects, such as language translation, date, time and currency formats, etc. However, using the SpringBoot framework, we can easily implement multi-language support and international applications. First, let us understand the LocaleResolver interface provided by SpringBoot. Loc

How to use Laravel to implement multi-language support How to use Laravel to implement multi-language support Nov 04, 2023 am 11:07 AM

Laravel is a very popular PHP framework that provides a large number of features and libraries that make web application development easier and more efficient. One of the important features is multi-language support. Laravel achieves multi-language support through its own language package mechanism and third-party libraries. This article will introduce how to use Laravel to implement multi-language support and provide specific code examples. Using Laravel's language pack function Laravel comes with a language pack mechanism that allows us to easily implement multilingualism

How to use Git with PHP How to use Git with PHP May 18, 2023 pm 04:31 PM

With the popularity and use of Git, many PHP developers have begun to use Git to manage their own code libraries. So how to use Git with PHP? This article will introduce it to you in detail. 1. Install Git First, before using Git, we need to install the Git client. In Linux, you can use the following command to install: sudoapt-getinstallgit. In Windows, you can go to the Git official website to download the corresponding Git client for installation. 2,

Laravel development: How to use Laravel Localization to achieve multi-language support? Laravel development: How to use Laravel Localization to achieve multi-language support? Jun 13, 2023 am 10:27 AM

With the trend of globalization, more and more websites and applications need to support multiple languages. In traditional website development, it is usually necessary to manually build pages in multiple languages, which is not only time-consuming and labor-intensive, but also error-prone. With the development of modern development technology, it has become a trend to use frameworks and tools to simplify multi-language support. In Laravel development, LaravelLocalization is a popular way to implement multi-language support. This article will introduce how to use LaravelLocal

How to use Golang to implement multi-language support for web applications How to use Golang to implement multi-language support for web applications Jun 24, 2023 pm 12:25 PM

With the continuous advancement of globalization, the need for multi-language is becoming more and more common, and multi-language support for web applications has become an issue that developers need to consider. Golang, as an efficient and easy-to-use programming language, can also solve this problem well. In this article, we will discuss how to implement multi-language support for web applications using Golang. 1. Basic principles of multi-language support The key to multi-language support for web applications lies in how to identify and store text in different languages. A common approach is to use

How to use the Webman framework to achieve internationalization and multi-language support? How to use the Webman framework to achieve internationalization and multi-language support? Jul 09, 2023 pm 03:51 PM

Nowadays, with the continuous development of Internet technology, more and more websites and applications need to support multi-language and internationalization. In web development, using frameworks can greatly simplify the development process. This article will introduce how to use the Webman framework to achieve internationalization and multi-language support, and provide some code examples. 1. What is the Webman framework? Webman is a lightweight PHP-based framework that provides rich functionality and easy-to-use tools for developing web applications. One of them is internationalization and multi-

See all articles