From b940c2a8705a5a2086ee0b2c5a7dcef01be23270 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Catoire Date: Tue, 23 Dec 2025 13:41:12 +0100 Subject: [PATCH 1/2] intl: document Locale::isRightToLeft (PHP 8.5) --- reference/intl/locale.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/reference/intl/locale.xml b/reference/intl/locale.xml index 34897d9bcaa5..8f355e5e69b5 100644 --- a/reference/intl/locale.xml +++ b/reference/intl/locale.xml @@ -46,6 +46,34 @@ +
+ Locale::isRightToLeft + + + As of PHP 8.5, the Locale::isRightToLeft method + can be used to determine whether a locale uses a right-to-left writing + system. + + + + This method relies on the ICU library and evaluates the dominant script + associated with the locale. + + + + If an empty string is provided, the default locale is used. + + + + Checking text direction for a locale + + +
+ +
&reftitle.classsynopsis; From af53fa1c789d9c5486e981a03df98b3282f81897 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Catoire Date: Tue, 6 Jan 2026 17:16:13 +0100 Subject: [PATCH 2/2] Add Locale::isRightToLeft method documentation --- reference/intl/locale.xml | 28 ------- reference/intl/locale/isrighttoleft.xml | 101 ++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 28 deletions(-) create mode 100644 reference/intl/locale/isrighttoleft.xml diff --git a/reference/intl/locale.xml b/reference/intl/locale.xml index 8f355e5e69b5..34897d9bcaa5 100644 --- a/reference/intl/locale.xml +++ b/reference/intl/locale.xml @@ -46,34 +46,6 @@
-
- Locale::isRightToLeft - - - As of PHP 8.5, the Locale::isRightToLeft method - can be used to determine whether a locale uses a right-to-left writing - system. - - - - This method relies on the ICU library and evaluates the dominant script - associated with the locale. - - - - If an empty string is provided, the default locale is used. - - - - Checking text direction for a locale - - -
- -
&reftitle.classsynopsis; diff --git a/reference/intl/locale/isrighttoleft.xml b/reference/intl/locale/isrighttoleft.xml new file mode 100644 index 000000000000..09c274754f8b --- /dev/null +++ b/reference/intl/locale/isrighttoleft.xml @@ -0,0 +1,101 @@ + + + + + + Locale::isRightToLeft + Check whether a locale uses a right-to-left writing system + + + + &reftitle.description; + + + &style.oop; + + + + public + static + bool + Locale::isRightToLeft + + stringlocale + "" + + + + + Determines whether a locale uses a right-to-left writing system. + + + + This method relies on the ICU library and evaluates the dominant script + associated with the locale. + + + + If an empty string is provided, the default locale is used. + + + + + &reftitle.parameters; + + + + locale + + + The locale identifier. If empty, the default locale is used. + + + + + + + + + &reftitle.returnvalues; + + Returns true if the locale uses a right-to-left + writing system, or false otherwise. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + PHP 8.5.0 + + Added Locale::isRightToLeft. + + + + + + + + + &reftitle.examples; + + Checking text direction for a locale + + + + +