Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
fff45d1f
Commit
fff45d1f
authored
May 03, 2007
by
Dries
Browse files
- Patch
#139970
by Gabor: locale cleanup.
parent
2a65f86b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
includes/locale.inc
View file @
fff45d1f
This diff is collapsed.
Click to expand it.
modules/locale/locale.info
View file @
fff45d1f
;
$
Id
$
name
=
Locale
description
=
E
nables
the
translation
of
the
user
interface
to
languages
other
than
English
.
description
=
Add
language
handling
functionality
and
e
nables
the
translation
of
the
user
interface
to
languages
other
than
English
.
package
=
Core
-
optional
version
=
VERSION
modules/locale/locale.install
View file @
fff45d1f
...
...
@@ -28,6 +28,7 @@ function locale_install() {
db_query
(
"CREATE TABLE
{
locales_source
}
(
lid int NOT NULL auto_increment,
location varchar(255) NOT NULL default '',
textgroup varchar(255) NOT NULL default '',
source blob NOT NULL,
PRIMARY KEY (lid),
KEY source (source(30))
...
...
@@ -64,6 +65,7 @@ function locale_install() {
db_query
(
"CREATE TABLE
{
locales_source
}
(
lid serial,
location varchar(255) NOT NULL default '',
textgroup varchar(255) NOT NULL default '',
source text NOT NULL,
PRIMARY KEY (lid)
)"
);
...
...
@@ -86,11 +88,14 @@ function locale_install() {
}
/**
* @defgroup updates-5.
0
-to-
x
.x Locale updates from 5.
0
to
x
.x
* @defgroup updates-5.
x
-to-
6
.x Locale updates from 5.
x
to
6
.x
* @{
*/
function
locale_update_2001
()
{
/**
* {locales_meta} table became {languages}.
*/
function
locale_update_6001
()
{
$ret
=
array
();
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
...
...
@@ -142,8 +147,24 @@ function locale_update_2001() {
}
/**
* @} End of "defgroup updates-5.0-to-x.x"
* The next series of updates should start at 3000.
* Add multiple text group support to allow for user defined string translation.
*/
function
locale_update_6002
()
{
$ret
=
array
();
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
case
'mysqli'
:
db_add_column
(
$ret
,
'locales_source'
,
'textgroup'
,
'varchar(255)'
,
array
(
'default'
=>
"''"
,
'not null'
=>
TRUE
));
break
;
case
'pgsql'
:
$ret
[]
=
update_sql
(
"ALTER TABLE
{
locales_source
}
ADD textgroup varchar(255) NOT NULL default ''"
);
break
;
}
return
$ret
;
}
/**
* @} End of "defgroup updates-5.x-to-6.x"
*/
/**
...
...
modules/locale/locale.module
View file @
fff45d1f
This diff is collapsed.
Click to expand it.
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