Documentation du code de SPIP et de ses plugins

LangOnet

generer_fichier.php

Table of Contents

Constants

_LANGONET_SIGNATURE_SPIP  = "// This is a SPIP language file -- Ceci est un fichier langue de SPIP"
_LANGONET_TAG_DEFINITION_L  = '<LANGONET_DEFINITION_L>'
_LANGONET_TAG_DEFINITION_MANQUANTE  = '<LANGONET_DEFINITION_MANQUANTE>'
_LANGONET_TAG_DEFINITION_OBSOLETE  = '<LANGONET_DEFINITION_OBSOLETE>'
_LANGONET_TAG_MODIFIE  = '# MODIF'
_LANGONET_TAG_NOUVEAU  = '# NEW'

Functions

inc_generer_fichier()  : mixed
Ecriture des fichiers de langue
generer_items_cible()  : array<string|int, mixed>
ecrire_fichier_langue_php()  : bool|string
Ecriture d'un fichier de langue à partir de la liste de ces couples (item, traduction) et de son bandeau d'information Cette fonction est aussi utilisée par PlugOnet
produire_fichier_langue()  : string
Produit un fichier de langue a partir d'un tableau (index => trad) Si la traduction n'est pas une chaine mais un tableau, on inclut un commentaire
entite2utf()  : string
Conversion d'un texte en utf-8

Constants

_LANGONET_SIGNATURE_SPIP

public mixed _LANGONET_SIGNATURE_SPIP = "// This is a SPIP language file -- Ceci est un fichier langue de SPIP"

_LANGONET_TAG_DEFINITION_L

public mixed _LANGONET_TAG_DEFINITION_L = '<LANGONET_DEFINITION_L>'

_LANGONET_TAG_DEFINITION_MANQUANTE

public mixed _LANGONET_TAG_DEFINITION_MANQUANTE = '<LANGONET_DEFINITION_MANQUANTE>'

_LANGONET_TAG_DEFINITION_OBSOLETE

public mixed _LANGONET_TAG_DEFINITION_OBSOLETE = '<LANGONET_DEFINITION_OBSOLETE>'

Functions

inc_generer_fichier()

Ecriture des fichiers de langue

inc_generer_fichier(string $module, string $langue_source, string $ou_langue[, string $langue_cible = 'en' ][, string $mode = 'valeur' ][, string $encodage = 'utf8' ][, array<string|int, mixed> $oublis_inutiles = array() ]) : mixed
Parameters
$module : string
$langue_source : string
$ou_langue : string
$langue_cible : string = 'en'

[optional]

$mode : string = 'valeur'

[optional]

$encodage : string = 'utf8'

[optional]

$oublis_inutiles : array<string|int, mixed> = array()

[optional]

generer_items_cible()

generer_items_cible(mixed $items_source, mixed $items_cible[, string $mode = 'index' ][, string $encodage = 'utf8' ][, array<string|int, mixed> $oublis_inutiles = array() ]) : array<string|int, mixed>
Parameters
$items_source : mixed
$items_cible : mixed
$mode : string = 'index'
$encodage : string = 'utf8'
$oublis_inutiles : array<string|int, mixed> = array()
Return values
array<string|int, mixed>

ecrire_fichier_langue_php()

Ecriture d'un fichier de langue à partir de la liste de ces couples (item, traduction) et de son bandeau d'information Cette fonction est aussi utilisée par PlugOnet

ecrire_fichier_langue_php( $dir,  $langue,  $module,  $items, string $bandeau, mixed $langue_source) : bool|string
Parameters
$dir :
$langue :
$module :
$items :
$bandeau : string
$langue_source : mixed
Return values
bool|string

produire_fichier_langue()

Produit un fichier de langue a partir d'un tableau (index => trad) Si la traduction n'est pas une chaine mais un tableau, on inclut un commentaire

produire_fichier_langue( $langue,  $module,  $items, string $bandeau, mixed $langue_source) : string
Parameters
$langue :
$module :
$items :
$bandeau : string
$langue_source : mixed
Return values
string

entite2utf()

Conversion d'un texte en utf-8

entite2utf(string $texte) : string
Parameters
$texte : string

Texte à convertir en UTF-8

Return values
string

Texte traduit en UTF-8 ou chaine vide


        
On this page

Search results