YUI Library Home

Site Search (YDN & YUIBlog):

# YUI Library Examples: ProfilerViewer Control (beta): ProfilerViewer Internationalization: German

# ProfilerViewer Control (beta): ProfilerViewer Internationalization: German

The ProfilerViewer Control can be easily internationalized by modifying the `STRINGS` member of `YAHOO.widget.ProfilerViewer` In this example, a German translation provided by Christian Heilmann is applied to the UI.

View example in new window.

## Adding a German Translation for the ProfilerViewer UI:

Customizing the ProfilerViewer UI for non-English languages is easy. In the example below, we've applied a German translation provided by Christian Heilmann to the ProfilerViewer.

This example has the following dependencies:

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/http://yui.yahooapis.com/2.6.0//build/calendar/assets/skins/sam/calendar.css"> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/profilerviewer/assets/skins/sam/profilerviewer.css"> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/utilities/utilities.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/element/element-beta-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/calendar/calendar.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yuiloader/yuiloader-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/profiler/profiler-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/profilerviewer/profilerviewer-beta-min.js"></script>

All of the interface's language strings live in the static member `YAHOO.widget.ProfilerViewer.STRINGS`. Customizing the interface simply involves modifying or replacing that object prior to creating your ProfilerViewer instance.

<div id="container">YAHOO.widget.ProfilerViewer.STRINGS = { title: "YUI Profiler (beta)", buttons: { viewprofiler: "Profiler Daten anzeigen", hideprofiler: "Profiler Report verstecken", showchart: "Diagramm anzeigen", hidechart: "Diagramm verstecken", refreshdata: "Daten neu laden" }, colHeads: { //key: [column label, column width in px] fn: ["Funktion/Methode", null], calls: ["Aufrufe", 60], avg: ["Durchschnitt", 90], min: ["Schnellste", 80], max: ["Langsamste", 85], total: ["Zeit total", 80], pct: ["Prozent", 70] }, millisecondsAbbrev: "ms", initMessage: "Diagramm wird vorbereitet...", installFlashMessage: "Konnte Flash Inhalt nicht laden. YUI Charts Control erfordert Flash Player 9.0.45 or neuer. Bitten laden Sie die neueste Version des Flash Players beim <a href='http://www.adobe.com/go/getflashplayer'>Adobe Flash Player Download Center</a> herunter." };

### ProfilerViewer Control (beta) Examples:

- Simple Profiling
- Using the ProfilerViewer API while Profiling the YUI Menu Control
- Using Profiler and ProfilerViewer to Profile non-YUI Code
- Skinning the ProfilerViewer Control
- ProfilerViewer Internationalization: Spanish
- ProfilerViewer Internationalization: German

### More ProfilerViewer Control (beta) Resources:

- User's Guide (external)
- API Documentation
- Cheat Sheet PDF (external)

Copyright © 2008 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings