-
Notifications
You must be signed in to change notification settings - Fork 847
Document Locale::isRightToLeft (PHP 8.5) #5055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lacatoire
wants to merge
13
commits into
php:master
Choose a base branch
from
lacatoire:intl/locale-isrighttoleft-doc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b940c2a
intl: document Locale::isRightToLeft (PHP 8.5)
lacatoire af53fa1
Add Locale::isRightToLeft method documentation
lacatoire 1bf0ef6
Merge branch 'php:master' into intl/locale-isrighttoleft-doc
lacatoire 5cd4db2
Merge branch 'master' into intl/locale-isrighttoleft-doc
lacatoire 4f29ef8
Merge remote-tracking branch 'origin/intl/locale-isrighttoleft-doc' i…
lacatoire d7c6492
Update reference/intl/locale/isrighttoleft.xml
lacatoire 6308cb9
Update reference/intl/locale/isrighttoleft.xml
lacatoire 8a3a03f
Update reference/intl/locale/isrighttoleft.xml
lacatoire 5a7af6d
Update reference/intl/locale/isrighttoleft.xml
lacatoire ee9283a
Update reference/intl/locale/isrighttoleft.xml
lacatoire 55837e8
Use <screen> for Locale::isRightToLeft example output
lacatoire 43de228
Update reference/intl/locale/isrighttoleft.xml
lacatoire 8a4ebe4
Update reference/intl/locale/isrighttoleft.xml
lacatoire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- $Revision$ --> | ||
| <refentry xml:id="locale.isrighttoleft" | ||
| xmlns="http://docbook.org/ns/docbook" | ||
| xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
|
|
||
| <refnamediv> | ||
| <refname>Locale::isRightToLeft</refname> | ||
| <refpurpose>Check whether a locale uses a right-to-left writing system</refpurpose> | ||
| </refnamediv> | ||
|
|
||
| <refsect1 role="description"> | ||
| &reftitle.description; | ||
| <methodsynopsis role="Locale"> | ||
| <modifier>public</modifier> | ||
| <modifier>static</modifier> | ||
| <type>bool</type> | ||
| <methodname>Locale::isRightToLeft</methodname> | ||
| <methodparam choice="opt"> | ||
| <type>string</type><parameter>locale</parameter> | ||
| <initializer>""</initializer> | ||
| </methodparam> | ||
| </methodsynopsis> | ||
|
|
||
| <simpara> | ||
| Determines whether a locale uses a right-to-left writing system. | ||
| </simpara> | ||
|
|
||
| <simpara> | ||
| This method relies on the ICU library and evaluates the dominant script | ||
| associated with the locale. | ||
| </simpara> | ||
|
|
||
| <simpara> | ||
| If an empty string is provided, the default locale is used. | ||
| </simpara> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="parameters"> | ||
| &reftitle.parameters; | ||
| <variablelist> | ||
| <varlistentry> | ||
| <term><parameter>locale</parameter></term> | ||
| <listitem> | ||
| <simpara> | ||
| The locale identifier. If empty, the default locale is used. | ||
| </simpara> | ||
| </listitem> | ||
| </varlistentry> | ||
| </variablelist> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="returnvalues"> | ||
| &reftitle.returnvalues; | ||
| <simpara> | ||
| Returns &true; if the locale uses a right-to-left | ||
| writing system, or &false; otherwise. | ||
| </simpara> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="changelog"> | ||
| &reftitle.changelog; | ||
| <informaltable> | ||
| <tgroup cols="2"> | ||
| <thead> | ||
| <row> | ||
| <entry>&Version;</entry> | ||
| <entry>&Description;</entry> | ||
| </row> | ||
| </thead> | ||
| <tbody> | ||
| <row> | ||
| <entry>PHP 8.5.0</entry> | ||
| <entry> | ||
| Added <methodname>Locale::isRightToLeft</methodname>. | ||
| </entry> | ||
| </row> | ||
| </tbody> | ||
| </tgroup> | ||
| </informaltable> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="examples"> | ||
| &reftitle.examples; | ||
| <example> | ||
| <title>Checking text direction for a locale</title> | ||
| <programlisting> | ||
| <![CDATA[ | ||
| var_dump(Locale::isRightToLeft('en-US')); // bool(false) | ||
| var_dump(Locale::isRightToLeft('ar')); // bool(true) | ||
| ]]> | ||
| </programlisting> | ||
lacatoire marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </example> | ||
| </refsect1> | ||
|
|
||
| </refentry> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.