TWLan Forum

Full Version: Übersetzen Stunden
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi sehr gut,

Diese DSLan Übersetzt ins Spanische, aber es gibt Dinge, die ich nicht oder nicht wie die Stunden. Zum Beispiel, wenn man setzt Öffnungszeiten:

Heute um 15:17 Uhr

Und das ist nicht, wohin er führt, Jemand peude ich sagen?

Sorry für mein Deutsch Smile

Vielen Dank
I do not understand what you've written. Please use a better translator or write in English.
Please do not use a Translator.
Translators sucks and translate not good.
Ich denke er meint dass die spanische übersetzung ganz gut is nur dass eben manche sachen noch deutsch sind......


Please write in English because we all are not able to understand you. Smile
Gibt es überhaupt eine Spanische Übersetzung?
Nein, ich glaube er hat es selber übersetzt, nur manche sachen kann er wohl nicht übersetzen.
Hi very good,

I DSLan translated to Spanish but there are things I can not because I can not find the file for modification, for example this:

Heute um 15:17 Uhr

Greetings
Where is it?
When resources are not available or are attacking you when you said the time put:

Heute um 15:17 Uhr

And I would like to put it in Spanish:

Today at 15:17 hours



Greetings
Try it with preg_replace()
Hm ... I dont know where you can edit this to:

Today at 15:17 hours
(08.06.2009, 18:46)-superking- Wrote: [ -> ]Try it with preg_replace()

Wie willst du des mit preg_replace machen?
Das ist in ner verschlüsselten Datei, das kann man nicht ändern !!
Und ab V2 wird mehrsprachig sein ...

MfG Manuel
(08.06.2009, 18:46)-superking- Wrote: [ -> ]Try it with preg_replace()

The function preg_replace() work for me! But when there are several words? as is?

For example:

morgen um 05:40 Uhr

I replaced by

Tomorrow at 5:40 Uhr

As we see the "Uhr" I could not change it.
You can easier use str_replace with two arrays as the search and replace arguments (see php.net)
@slimshady, man bekommt eine variable, die ein string ist in smarty. Man kann ihn smarty auch php ausführen, dabei ändern sich die variablen bezeichnungen ein bischen, aber man kann sie immernoch verändern
Hmm, könnte vllt klappen, aber du weißt nich wie die Variable heißt, oder!?

MfG Manuel
Doch, ich müste halt nachschauen Wink schau dir doch mal die dateien in templates_c an Wink achja, php macht man in smarty {php}CODE{/php}. Kann vllt auch [php] gewesen sein, bin mir nicht ganz sicher, hab jetzt keine lan da...
Ich weiß -.-
{php} ist es, bzw so wie dus in der Smarty_config.class.php einstellst, aber die is bei der lan ja encodet ...
Ja mal schaun...

MfG Manuel
Code:
{php} $var = ((is_array($_tmp=$this->_tpl_vars['array']['end_time'])) ? $this->_run_mod_handler('format_date', true, $_tmp) : format_date($_tmp));                         
$var2 = preg_replace("/morgen um/","Mañana a las",$var);
$var3 = preg_replace("/heute um/","Hoy a las",$var);
$var4 = preg_replace("/am/","El",$var);
$var4b = preg_replace("/um/","a las",$var4);
if (substr($var2, 0, 2) == Ma)
{
echo substr($var2, 0, -3);
}
else
{
if (substr($var3, 0, 2) == Ho)
{
echo substr($var3, 0, -3);
}
else
{
echo substr($var4b, 0, -3);
}
}  {/php}
Does it work?
(08.06.2009, 23:05)-superking- Wrote: [ -> ]Does it work?

Yes it works