C# Class Pchp.Library.Locale

This class manages locale information for PHP and interacts .NET Framework.
Exibir arquivo Open project: iolevel/peachpie

Public Methods

Method Description
localeconv ( Context ctx ) : PhpArray

Gets information about the current thread culture.

nl_langinfo ( int item ) : string

Not supported.

strcoll ( Context ctx, string str1, string str2 ) : int

Compares two specified strings, honoring their case, using culture specific comparison.

Private Methods

Method Description
GetCulture ( Context ctx, Category category ) : CultureInfo

Gets a culture specific for the given category.

GetCultureByName ( string name ) : CultureInfo

Gets a culture of a specified name. Tries "{language}-{country}", "{country}-{language}". Recognizes "C", "", "0" and null as invariant culture. Note, PHP swaps language and country codes.

GetCultures ( Context ctx ) : System.Globalization.CultureInfo[]

Cultures associated with cathegories.

GetFirstExistingCulture ( Context ctx, object locale, object moreLocales, CultureInfo &culture ) : bool

Searches in given objects for a locale string describing an existing culture.

GetGroupingArray ( int groups ) : PhpArray

Converts .NET groups information to PHP array.

GetStringComparer ( Context ctx, bool ignoreCase ) : PhpLocaleStringComparer

Creates a new PhpLocaleStringComparer comparing according to the current collate.

SetCulture ( Context ctx, Category category, CultureInfo culture ) : void

Sets a culture specific for the given category.

setlocale ( Context ctx, Category category, object locale ) : string

Method Details

localeconv() public static method

Gets information about the current thread culture.
public static localeconv ( Context ctx ) : PhpArray
ctx Pchp.Core.Context
return Pchp.Core.PhpArray

nl_langinfo() public static method

Not supported.
public static nl_langinfo ( int item ) : string
item int
return string

strcoll() public static method

Compares two specified strings, honoring their case, using culture specific comparison.
public static strcoll ( Context ctx, string str1, string str2 ) : int
ctx Pchp.Core.Context Current runtime context.
str1 string A string.
str2 string A string.
return int