Yahoo! Developer Network Home - Help

YDN Site Search

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

# ProfilerViewer Control (beta): ProfilerViewer Internationalization: Spanish

The ProfilerViewer Control can be easily internationalized by modifying the `STRINGS` member of `YAHOO.widget.ProfilerViewer` In this example, a Spanish translation provided by Caridy Patiño Mayea is applied to the UI.

View example in new window.

## Adding a Spanish Translation for the ProfilerViewer UI:

Customizing the ProfilerViewer UI for non-English languages is easy. In the example below, we've applied a translation provided by Caridy Patiño Mayea 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.5.1//build/calendar/assets/skins/sam/calendar.css"> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.1/build/profilerviewer/assets/skins/sam/profilerviewer.css"> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/utilities/utilities.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/element/element-beta-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/calendar/calendar.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/yuiloader/yuiloader-beta-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/profiler/profiler-beta-min.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/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 instantiating your ProfilerViewer instance.

<div id="container">YAHOO.widget.ProfilerViewer.STRINGS = { title: "YUI Profiler (beta)", buttons: { viewprofiler: "Mostrar datos del Profiler", hideprofiler: "Ocultar reporte del Profiler", showchart: "Mostrar Gráfica", hidechart: "Ocultar Gráfica", refreshdata: "Refrescar Datos" }, colHeads: { //key: [column label, column width in px] fn: ["Función/Método", null], calls: ["Llamadas", 70], avg: ["Promedio", 70], min: ["Menor", 70], max: ["Mayor", 70], total: ["Tiempo Total", 90], pct: ["Porcentaje", 80] }, millisecondsAbbrev: "ms", initMessage: "Inicializando gráfica...", installFlashMessage: "No se pudo cargar el contenido Flash. El control YUI Charts requiere Flash Player 9.0.45 o superior. Usted puede descargar la última versión del Flash Player del <a href='http://www.adobe.com/go/getflashplayer?Lang=Spanish'>Centro de descargas de Adobe Flash Player</a>." };

### 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