Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
domainepublic
alternc
Commits
6cb836c4
Commit
6cb836c4
authored
Feb 08, 2013
by
Alan Garcia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Desactive les langues non traduites
(coucou azerttyu \o)
parent
ec64764c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
bureau/class/lang_env.php
bureau/class/lang_env.php
+10
-5
No files found.
bureau/class/lang_env.php
View file @
6cb836c4
<?php
$lang_translation
=
array
(
$lang_translation
=
array
(
# If you comment lang here, it won't be displayed.
"fr_FR"
=>
"Français"
,
"en_US"
=>
"English"
,
"es_ES"
=>
"Español"
,
"it_IT"
=>
"Italiano"
,
"de_DE"
=>
"Deutsch"
,
"pt_BR"
=>
"Portuguese"
,
#
"es_ES" => "Español",
#
"it_IT" => "Italiano",
#
"de_DE" => "Deutsch",
#
"pt_BR" => "Portuguese",
"nl_NL"
=>
"Dutch"
,
);
global
$arr_lang_translation
;
$arr_lang_translation
=
$lang_translation
;
// not pretty but I don't want side effect right now
function
update_locale
(
$langpath
)
{
global
$arr_lang_translation
;
$locales
=
array
();
$file
=
file
(
"/etc/locale.gen"
,
FILE_SKIP_EMPTY_LINES
);
if
(
!
is_array
(
$file
)
)
return
$locales
;
foreach
(
$file
as
$v
)
{
if
(
(
preg_match
(
"/^([a-z][a-z]_[A-Z][A-Z])/"
,
trim
(
$v
),
$mat
)
&&
file_exists
(
$langpath
.
'/'
.
$mat
[
1
])
)
)
{
if
(
!
array_key_exists
(
$mat
[
1
],
$arr_lang_translation
)
)
continue
;
$locales
[
$mat
[
1
]]
=
$mat
[
1
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment