Quoting Eero af Heurlin <[EMAIL PROTECTED]>:
> hmm, is the MidCOM localization (edit) tool inherently different from 
> the default one in NemeinLocalization package (never had trouble with 
> scandinavian characters there) ?

It is using its own system. See snippets on devel...

The relevant lines I think are:
/ midcom/admin/controls/l10n/_code/main method can_handle:
            if (array_key_exists("string_id", $_REQUEST)) {
                $this->_save_update = Array (
                    "id" => $_REQUEST["string_id"],
                    "value" => $_REQUEST["string_value"]
                );
            }

method handle:
            if ($this->_save_update) {
                debug_add("Updating strings", MIDCOM_LOG_DEBUG);
                foreach ($this->_save_update["id"] as $k => $v) {
                    $id = $this->_save_update["id"][$k];
                    $loc = $this->_save_update["value"][$k];
                    
                    if ($this->_l10n->string_exists($id, $this->_lang)) {
                        if ($loc == "") {
                            debug_add("    Resetting '$id'", MIDCOM_LOG_DEBUG);
                            $this->_l10n->delete($id, $this->_lang);
                        } else {
                            debug_add("    Updating '$id' -> '$loc'",
MIDCOM_LOG_DEBUG);
                            $this->_l10n->update($id, $this->_lang, $loc);
                        }
                    } else if ($loc != "") {
                        debug_add("    Creating '$id' -> '$loc'", MIDCOM_LOG_DEBUG);
                        $this->_l10n->create($id, $this->_lang, $loc);
                    } else
                        debug_add("    Ignoring '$id' -> '$loc'", MIDCOM_LOG_DEBUG);
                }
            }

snippet /midcom/services/_i18n_l10n method update:
$snippet->code = chunk_split(base64_encode($translation));

So chunk_split seems to be the main difference here. In NemeinLocalization
we just:
$string=base64_encode($translation);

> /Rambo

/Bergie




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to