PHP setlocale() ফাংশন

উদাহরণ

US English হিসাবে জাতীয়তা সংক্রান্ত তথ্য সংযোজিত করে, এবং পরে সিস্টেম ডিফল্ট হিসাবে ফিরে আসুন

<?php
echo setlocale(LC_ALL,"US");
echo "<br>";
echo setlocale(LC_ALL,NULL);
?>

চলতি প্রয়োগ

সংজ্ঞা ও ব্যবহার

setlocale() ফাংশন জাতীয়তা সংক্রান্ত তথ্য (ভূগোলিক তথ্য) নির্ধারণ করে

জাতীয়তা সংক্রান্ত তথ্য একটি ভূগোলিক অঞ্চলের ভাষা, মুদ্রা, সময় এবং অন্যান্য তথ্য

Comments:setlocale() ফাংশন শুধুমাত্র বর্তমান স্ক্রিপ্টের জন্য জাতীয়তা সংক্রান্ত তথ্য পরিবর্তন করে

টীকা:setlocale(LC_ALL,NULL) দ্বারা জাতীয়তা সংক্রান্ত তথ্যকে সিস্টেম ডিফল্ট হিসাবে সংযোজিত করা যেতে পারে

টীকা:সংখ্যা ফরম্যাটিং তথ্য পাওয়ার জন্য, দেখুন localeconv() ফাংশন

ব্যবহারিকা

setlocale(constant,location)
প্রমাণপত্র বর্ণনা
constant

প্রয়োজনীয়। কোন জাতীয়তা সংক্রান্ত তথ্য নির্ধারণ করুন

ব্যবহার্য কনস্ট্যান্টস:

  • LC_ALL - নিচের সমস্ত অপশনগুলো সমন্বিত
  • LC_COLLATE - সার্চ করার ক্রম
  • LC_CTYPE - Character Categories and Conversion (e.g., all characters uppercase or lowercase)
  • LC_MESSAGES - System Message Format
  • LC_MONETARY - Currency Format
  • LC_NUMERIC - Number Format
  • LC_TIME - Date and Time Format
location

Required. Specifies which country/region to set the locale information to. It can be a string or an array. Multiple locations can be passed.

If location If the parameter is NULL or an empty string "", the location name will be set to the value of the environment variable with the same name as the constant above or set according to "LANG".

If location The parameter is "0", the location setting is not affected, and only the current setting is returned.

If location The parameter is an array, and setlocale() will try each array element until a valid language or locale code is found. This is very useful if a location has different names on different systems.

Comments:To view all available language codes, please visit ourLanguage Code Reference Manual.

Technical Details

Return Value: Returns the current locale settings, or FALSE if it fails. The return value depends on the system running PHP.
PHP Version: 4+
Update Log:

In PHP 4.2.0, passing constants as strings has been deprecated. Please use the available constants instead. Passing constants as strings will produce a warning message.

In PHP 4.3.0, multiple locations can be passed.

Starting from PHP 5.3.0, if passed to constant The parameter is a string, not one of the LC_ constants, and the function will throw an E_DREPRECATED notification.