Seiten

Mittwoch, 25. Juni 2014

RoboScripter

RoboScripter ist eine Windows-Applikation, zum Programmieren der Mitsubishi Mehrachsroboter RV-M1 mit der Programmiersprache MRL (Mitsubishi Runtime Language).RoboScripter is a Windows application, to program the Mitsubishi multi axis robots RV-M1 using the programming language MRL(Mitsubishi Runtime Language).




Der RoboScripter wird nicht weiterentwickelt, da ich den Einsatz der Programmiersprache MRL in der Ausbildung für wenig sinnvoll halte. Statt dessen setze ich auf den RV-M1 Wrapper.The RoboScripter is not developed further, because I think the usage of the language MRL for training is not so useful. Instead, I develop the RV-M1 Wrapper.

Mittwoch, 14. Dezember 2011

Blogger - Posts zweisprachig ausliefern

Mit dem hier beschrieben jQuery/JavaScript-Projekt, kann man seine Posts, ohne Seitenreload und inklusive Posttitel, zweisprachig ausliefern.With this jQuery/JavaScript project, you can deliver your posts, without page reload and inclusive post title, bilingual.

Alle Teile des Posts bei denen die Sprache umgeschaltet werden soll, müssen in span-Tags mit dem entsprechendem lang-Attribut eingeschlossen sein. Der Titel des Posts muss in den ersten span-Tag der jeweiligen Sprache.All parts of the post where the language is to be toggled, must be in span tags with the matching lang attribute. The title of the post must be in the first span tag of the language.

<p>
  <span lang="de" title="deutscher Posttitel">deutscher Posttext</span>
  <span lang="en" title="english post title">english post text</span>
</p>
<p>
  <span lang="de">mehr deutscher Posttext</span>
  <span lang="en">more english post text</span>
</p>

Zum Umschalten bindet man erstens die multilang.js im header seines Blogs ein. Zweitens muss folgender Code nach dem Seitenload ausgeführt werden:To toggle binds first multilang.js in the head of your blog. Secondly, the following code must be executed after pageload:

// count h3 child objects with lang and title attribut
// Possible problem: no class .post-outer in blog template?
headerLength = $('[lang="' + language + '"][title]').parentsUntil('.post-outer:first').find('h3').length;
   
if(headerLength > 0)
{
  // &lt; must be
  for(var i = 0; i &lt; headerLength; i++)
  {
    getPostHeader(i).html(getPostTitle(i)); 
  }
  switchDisplay();   
}

Wie man dass, mit Hilfe der jQuery ready()-Funktion, am besten macht ist hier beschrieben.
Die gewünschten Sprachen und die entspechenden Flaggen definiert man in multilang.js.
As one that, with the help of the jQuery ready() function, makes it the most, is described here.
Define the languages you use and the appropriate flags in multilang.js.

// specify the languages to switch
var firstLang  = "de";
var secondLang = "en";
var firstFlag = "de.jpg";
var secondFlag = "uk.jpg";