summaryrefslogtreecommitdiff
path: root/edit_languages.php
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2011-04-30 00:47:46 -0400
committerspiderr <spider@viovio.com>2011-04-30 00:47:46 -0400
commit8207024c6e242f500b49b171a1527f8e6111e69a (patch)
treecba721c47a4544257a167b4673d90380a198f63e /edit_languages.php
parentd5b6c2b342deda0b0cde496c4bda5cc344e23e18 (diff)
downloadlanguages-8207024c6e242f500b49b171a1527f8e6111e69a.tar.gz
languages-8207024c6e242f500b49b171a1527f8e6111e69a.tar.bz2
languages-8207024c6e242f500b49b171a1527f8e6111e69a.zip
seperate out string translation per language into a separate file, add support for google translate API
Diffstat (limited to 'edit_languages.php')
-rw-r--r--edit_languages.php28
1 files changed, 1 insertions, 27 deletions
diff --git a/edit_languages.php b/edit_languages.php
index e596629..b4e20d8 100644
--- a/edit_languages.php
+++ b/edit_languages.php
@@ -102,34 +102,8 @@ if( !empty( $_REQUEST['clear_cache'] ) ) {
$gBitSmarty->assign_by_ref( 'defaults', $languages[$_REQUEST['lang']] );
}
$gBitSmarty->assign( 'editDescription', TRUE );
-} elseif( !empty( $_REQUEST['save_translations'] ) ) {
- $editLang = $_REQUEST['lang'];
- $gBitLanguage->loadLanguage( $editLang );
- $storedStrings = NULL;
- foreach( $_REQUEST['edit_trans'] as $sourceHash => $string ) {
- if( $string != $gBitLanguage->mStrings[$editLang][$sourceHash]['trans'] ) {
- // we need to remove the $_REQUEST slashes here to avoid stuff like:
- // {$gBitSystem->getConfig(\'stuff\')} in the translated strings -
- // it will kill the site since smarty won't be able to interpret
- // the template anymore --xing
- if( ini_get( 'magic_quotes_gpc' ) ) {
- $string = stripslashes( $string );
- }
- $gBitLanguage->storeTranslationString( $editLang, $string, $sourceHash );
- // update string in template as well
- $tranStrings[$sourceHash]['trans'] = $string;
- // this has to be the source, otherwise the translated string will enter the db and be recognised as a used master
- $storedStrings[] = $gBitLanguage->mStrings[$editLang][$sourceHash]['source'];
- }
- }
- $tranStrings = $gBitLanguage->getTranslationString( $sourceHash, $editLang );
- $gBitSmarty->assign_by_ref('tranStrings', $tranStrings );
- $gBitSmarty->assign( 'lang', $editLang );
- $gBitSmarty->assign( 'translate', TRUE );
- $gBitSmarty->assign( 'saveSuccess', tra( "The following items have been saved successfully" ).":" );
- $gBitSmarty->assign( 'storedStrings', $storedStrings );
}
-$gBitSystem->display( 'bitpackage:languages/edit_languages.tpl', tra( 'Edit Translations' ) , array( 'display_mode' => 'edit' ));
+$gBitSystem->display( 'bitpackage:languages/edit_languages.tpl', tra( 'Edit Languages' ) , array( 'display_mode' => 'edit' ));
?>