Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • AbstractLocale
  • Overview
  • Namespace
  • Class
  • Tree

Class AbstractLocale

XOOPS localization abstract

Direct known subclasses

XoopsLocaleEn_US

Indirect known subclasses

XoopsLocale
Abstract
Namespace: Xoops\Locale
Package: Xoops\Locale\Abstract
Category: Xoops\Locale
Copyright: 2000-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Taiwen Jiang phppp@users.sourceforge.net
Link: http://xoops.org
Located at oops_lib/Xoops/Locale/AbstractLocale.php
Methods summary
public static boolean
# isMultiByte( )

isMultiByte - does locale depend on multi-byte characters?

isMultiByte - does locale depend on multi-byte characters?

Deprecated

since 2.6.0 -- UTF-8 is always used

Returns

boolean
true always true with UTF-8
public static boolean
# isRtl( )

isRtl - is text order right to left?

isRtl - is text order right to left?

Returns

boolean
true if right to left
public static
# setLocale( )

todo, do not forget to set this on locale load

todo, do not forget to set this on locale load

public static string
# getCharset( )

getCharset - return current character set, always UTF-8

getCharset - return current character set, always UTF-8

Returns

string
character set
public static string
# getLocale( )

getLocale - return the current locale

getLocale - return the current locale

Returns

string
public static string
# getLangCode( )

getLangCode - return language code for the current locale (locale with '-' separator)

getLangCode - return language code for the current locale (locale with '-' separator)

Returns

string
public static string
# getLegacyLanguage( )

getLegacyLanguage - return legacy language code for the current locale

getLegacyLanguage - return legacy language code for the current locale

Returns

string
public static string
# getTimezone( )

Returns

string
public static string[]
# getFonts( )

The generic css fonts are: - cursive - fantasy - monospace - sans-serif - serif

The generic css fonts are: - cursive - fantasy - monospace - sans-serif - serif

Returns

string[]
public static array
# getFontSizes( )

The css should adjust based on the html:lang(ja) { font-size: 150%; } Then classes can be relative to that base em CJK fonts may need to be shown in a larger size due to complex glyphs

The css should adjust based on the html:lang(ja) { font-size: 150%; } Then classes can be relative to that base em CJK fonts may need to be shown in a larger size due to complex glyphs

Returns

array
public static string[]
# getAdminRssUrls( )

Returns

string[]
public static string
# substr( mixed $str, integer $start, integer $length, string $ellipsis = '…' )

Parameters

$str
$start
$length
$ellipsis

Returns

string
public static string
# utf8_encode( mixed $text )

filter to UTF-8, converts invalid $text as CP1252 and forces NFC normalization

filter to UTF-8, converts invalid $text as CP1252 and forces NFC normalization

Parameters

$text

Returns

string
public static string
# convert_encoding( mixed $text, string $to = 'utf-8', string $from = '' )

Deprecated

Parameters

$text
$to
$from

Returns

string
public static string
# trim( mixed $text )

XoopsLocalAbstract::trim()

XoopsLocalAbstract::trim()

Parameters

$text

Returns

string
public static string
# formatTimestamp( mixed $time, string $format = 'l' )

Function to display formatted times in user timezone

Function to display formatted times in user timezone

Parameters

$time
$format

Format codes () 's' or 'short' - short; 'm' or 'medium' - medium; 'l' or 'long' - long; 'c' or 'custom' - format determined according to interval to present; 'e' or 'elapse' - Elapsed; 'mysql' - Y-m-d H:i:s; 'rss'

Returns

string
public static string
# number_format( integer $number )

Parameters

$number

Returns

string
public static string
# money_format( string $format, string $number )

Parameters

$format
$number

Returns

string
public static
# asort( array & $array )

Sort array values according to current locale rules, maintaining index association

Sort array values according to current locale rules, maintaining index association

Parameters

$array
to sort
API documentation generated by ApiGen