projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
823de6e
)
mysql/i18n_translate.sql
author
Alan Knowles
<alan@roojs.com>
Fri, 11 Oct 2013 09:29:20 +0000
(17:29 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 11 Oct 2013 09:29:20 +0000
(17:29 +0800)
mysql/i18n_translate.sql
patch
|
blob
|
history
diff --git
a/mysql/i18n_translate.sql
b/mysql/i18n_translate.sql
index
e69de29
..
23c287c
100644
(file)
--- a/
mysql/i18n_translate.sql
+++ b/
mysql/i18n_translate.sql
@@
-0,0
+1,14
@@
+
+DROP FUNCTION IF EXISTS i18n_translate;
+DELIMITER $$
+CREATE FUNCTION i18n_translate(in_ltype varchar(1) , in_lkey varchar(8), in_inlang varchar(8))
+ RETURNS VARCHAR(64) DETERMINISTIC
+ BEGIN
+ DECLARE ret VARCHAR(64);
+ SET ret = '';
+ SELECT lval INTO ret FROM i18n
+ WHERE ltype=in_ltype AND lkey=in_lkey and inlang=in_inlang LIMIT 1;
+ RETURN ret;
+
+ END $$
+DELIMITER ;
\ No newline at end of file