Translation of Properties of "ParagraphStyle"

Hi everybody,
I need a little help with the translation of some properties for a user interface. Some properties of “ParagraphStyle” should be displayed for the user in German.
Does anyone know how “Ruby Font” or “Kenten Font” is best translated into German?
And what is meant by “previewColor” in connection with “ParagraphStyle”?
The Reference Guide says only: “The color to use for preview, … representing R,G, and B values, …”. But what preview?
Thanks for the help!
Roland

I need a little help with the translation of some properties for a user interface. Some properties of “ParagraphStyle” should be displayed for the user in German.
Does anyone know how “Ruby Font” or “Kenten Font” is best translated into German?
Just as we do not translate "Ruby" and "Kenten" into English, so you should not translate them into German. InDesign does not localize these terms, and that is correct. Anyone who wants to use them will refer to them by their transliterated-into-English names, Ruby and Kenten. Trying to come up with German names will simply cause confusion.
As for your second question, in this post, Helpful AnswerRe: Fast Display always gray, Jongware suggests it doesn't do anything.

Similar Messages

  • Adding properties with ParagraphStyles.add()

    Hi!
    I must be misunderstanding how the property "properties" of classes ParagraphStyle and CharacterStyle works. I have a function which looks for text with provided attributes and assigns an existing paragraph style to it. If the requested paragraph style doesn't exist a new style should be created and that's where I'm having trouble. I'd thought I could just write...
    app.activeDocument.paragraphStyles.add({
                name: styleName,
                properties: myProperties
    ...and that the style would be created with all those properties but it doesn't work that way. However if I write
    app.activeDocument.paragraphStyles.add({
                name: styleName,
                fontStyle: myProperties.fontStyle
    then the right fontStyle gets applied to the new paragraph style, so the values are in the variable myProperties for sure. Any ideas on how to get this workning? See the full function with caller below if you need the context.
    applyParagraphStyle("s-heading", {pointSize: 12, fontStyle: "Bold"});
    function applyParagraphStyle(styleName, myProperties) {
        app.findGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences.properties = myProperties;
        var styles = app.activeDocument.paragraphStyles;
        var style;
        var found = app.activeDocument.findGrep();
        try {
            style = styles.item(styleName);
            //try to assign style.name to value to see if an error is thrown
            var n = style.name;
        catch (myError) {
            alert("Couldn't find paragraph style '" + style.name + "'. New style created.");
            style = styles.add({
                name: styleName,
                properties: myProperties
        for (i = 0; i < found.length; i++){
            found[i].applyParagraphStyle(style, false);

    Hi,
    First:
    myProperties supposed to be set like:
    myProperties = {prop1: value1, prop2: value2};
    Second:
    "name" is a property as well. If you want to set it separatelly you should do it in a separate code line;
    Finally adding PStyle use:
    styles.add(myProperties);
    rgds

  • Publishing of the translation for an Iview fails without any notice

    We face the followoing problem with an custom IView in SAP portal:
    The publishing of the translation for an Iview fails without any notice it only works directly after the IView was deployed.
    The translation is done by first generating the translation data then translating to the several languages, marking the data as translated. After that the translation is published via the Translation Worklist Coordination.
    All is done in the Portal under Contenet-Administration->Portal Content Translation, Translation Worklist Coordination and Worklist Translation
    The publishing works directly after deployment of an iView but if one tries to retranslate the translation is saved in the repository but not published. If we delete the translation Worklist and start over again the translations that are not published are still in the generated data but still we can’t publish them.
    There is no Information that the publication failed or anything. In the Worklist it just goes back to normal state where we can again generate the translation data.
    The Iview is a Java IView for the translation a properties file was created and all the words from properties file show up in the generated data from the Worklist.
    We could deploy the Iview every time the translation needs to be changed but the customer wants to do the translation without that step.
    We use the following Versions:
    Sap Portal nw2004s
    sap.com/SAP-JEECOR 7.00 SP10 (1000.7.00.10.0.20061026144500) 20070119122211
    sap.com/SAP-JEE 7.00 SP10 (1000.7.00.10.0.20061026144500) 20070119121940
    Thanks 4 Help

    Please review the terms of your Comcast agreement. Many agreements include scheduled price increases, and typically state that prices will return to the prevailing (almost always higher) rates when the agreement expires.
    If you still have questions contact one of their Billing reps at the phone number on your bill or 1-800-Comcast, chat with them using one of the "Account and Bill" options at https://www.comcastsupport.com/chatentry/, or visit a Service Center if one is nearby (check locations and hours at http://customer.xfinity.com/service-center-locations).
    Comcast sometimes responds to questions here in the forums, and sometimes they do not. When they do the typical response time is somewhere between a few hours and a few days.

  • Non-Latin-1 characters in properties files?

    We are having substantial difficulties translating a properties file into Turkish (which uses 6 characters outside the Latin 1 code page). The only way we've found to encode them that seems to work is to encode them with backslash escapes. Is there a better way?

    No, what you did is what you have to do. From the API documentation for Properties:
    "When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings."

  • ADF:  Translated XLIFF Resource Bundle not Selected at Runtime

    Issue: When I run my ADF app in a web browser where French is selected as the default language, the labels on the form are still populated with English text from the default resource bundle, even though an XLIFF resource bundle for French exists.
    Details: I have created a default XLIFF resource bundle containing the text for all labels on my form in English, called labels.xlf. I have also created two translated XLIFF bundles for French and German and named them labels_fr.xlf and labels_de.xlf, respectively.
    On my form, I have used value expressions to retrieve the text for each component's label, like label="#{res.language}. JDeveloper added '<c:set var="res" value="#{adfBundle['oracle.fosxliff.uitest.labels']}"/>' to the top of my page, so I could access the resource bundle text. Identifying the resource bundle in the faces-config.xml file does not work. However, I did define which locales are supported by my application in this config file.
    *NOTE:* When I access these sames resource bundles in a managed bean by utilizing the locale of the UIViewRoot, the correct XLIFF file is retrieved and the translated text is correctly assigned to my components on the form.
    Is there some other configuration that I am missing? I was expecting XLIFF files to work similarly to properties files, which do work correctly regardless of whether the text is accessed using value expressions or managed beans.

    Ok, I've found the answer.
    I've added translatable custom properties on the view implemention
    and access these in the code...

  • Nested styles in CS2. Absence of property appliedNestedStyle

    In task I'm working on there is a subtask of extracting overrides from the text.
    The way I implement it is pretty straightforward: I iterate through all textStyleRanges. With each textStyleRange object I compare its style properties with style properties of paragraphStyle and characterStyle that are applied to it.
    Things are getting harder when nested styles come into play.
    When they are applied, they should be taken into account along with appliedParagraphStyle and appliedCharacterStyle.
    This issue also affects Drop Caps. When the character style is applied to Drop Cap this character style becomes nested.
    In CS3 scripting objects (textStyleRange, text, etc) has property appliedNestedStyle. So to extract overrides I can use it.
    But in InDesign CS2 there is no such property...
    So the question is how can I get applied nested style in CS2? Or maybe some workaround to accomplish the same goal?

    Indexes
    Scripting indexes has changed a lot. It finally works, and it works well. The property 'subtopic' has gone, instead you iterate the property 'topic' (up to three times). The following lines illustrate:
    if( app.activeDocument.indexes.length == 0 )
    myIndex = app.activeDocument.indexes.add()
    else
    myIndex = app.activeDocument.indexes[0]
    //create main topic
    myIndex.topics.add('dog')
    //create subtopics
    myIndex.topics.item('dog').topics.add('collie')
    myIndex.topics.item('dog').topics.add('setter')
    myIndex.topics.item('dog').topics.item('collie').topics.add('border collie')
    myIndex.topics.item('dog').topics.item('collie').topics.item('border collie').topics.add('*****')
    You can address (sub)topics by asking for topics embedded under topics:
    myIndex.topics[0].topics[0].topics[0].topics[0].name
    is the first subtopic of the first subtopic of the first subtopic of the first topic.
    A new property is allTopics: myIndex.allTopics returns an array of all (sub)topics. This is a flat, one-dimensional, array, i.e. it returns the whole index but without structure.

  • User Shape in Secondaries

    HI!
    I'm new in Color, and I'm testing how it works, because I shall colorgrade a video with around 200 shots next week.
    I have run in to a strange problem. In Secondaries I make a User Shape, this brings me to Geometry. There I track my mask, safe it, and attach it to the mask (In this case tracker 1). I Attach my mask on the Secondary (In this case 3). I go back to my Secondary. Colorgrade the selekted, ..are happy. Close down and go home. Next morning when I open my projekt, my Secondary (3) are emty.
    I can find (load) my mask in Geometry, then I can attach my tracker again. Then my colorgrade are back too.
    But why are the Shape and the Track information not saved with the projekt?
    Can anyone tell me where I go wrong?
    Pleace...
    Christina

    Here's a little treasure hunt for you all, some directory spelunking.
    A COLOR project container saves everything that could be used to move the entire project to another machine. The "bins" that exist within the interface are just ways of splitting up the grade internally so that components can be copied within the timeline. Abandon all "Final Cut" thinking before proceeding... paraphrasing Dante... Abbandona ogni speranza, tutti che entrate. Actually as you drill down through the container, you may be reminded of his tour of the various circles of ****...
    Try this. Navigate to the directory containing the COLOR project. For me, its in "Final Touch Items". its a bit of a private, ironic joke. Right-click on the .colorproj line item. Select "Show package contents". You should be presented with a pane containing a number of files and folders like "Archive", "Still Store", "Shots", the xml files (if created) and some ls files. Open the "Shots" directory.
    You will be presented with a directory listing corresponding to all the clips in your project, numbered like the shot list in the Setup Room. Pick one that might be interesting, like "Clip 31", which has a tracked user shape in it, maybe. It will open to reveal more files and directories, "Grades", "Pan and Scan", a thumbnail, and a .si file which is a very interesting little file to interrogate (use Text Editor) to figure out why that clip is behaving in some weird way, because it is essentially the XML translated "Item Properties/Format" dialogue that FCP has sent to COLOR. If you have run a tracker, there should be a trk file, which is the tracker data for that clip. Each grade that you have composed for that clip will have a grade-directory. Each grade directory will contain a file that represents the IN primary color correction (pcc), an OUT pcc, a scc (secondary) and a cfx. It may contain a kfd file, which is the keyframe data. It may contain a bsx file, which is the user shape, which I think you are calling a "mask".
    In answer to your direct question "are my masks saved in the Secondary bin?" No. They are saved as part of the overall grade, and you access it through the Geometry Room/User Shapes interface.
    By the way, the on-screen representation of the user shape will disappear every time you exit the clip you are working on. (Its a bit of a pain, actually) You are required to re-select it in the user shapes bin in the Geometry Room/User Shapes to re-reveal it. By any chance... ? Because you don't see the shape control points doesn't mean that it isn't being applied, if it has been connected. I wonder if that has led you to believe that the shape has been thrown away.
    The internal architecture of COLOR is not something that most people delve into until faced with some kind of nightmare forensic reconstruction... care to speculate on how I got to know it so well?
    Not from somebody else's training DVD, that's for sure.
    jPo

  • Can't play video files - max CPU

    I have an out-of the box MacBook with leopard - and I simply had to use Force quit about a thousand times.
    The problem:
    When I try to...
    - import (iPhoto)
    - play (Quicktime)
    - Preview
    - open a folder in which there is...
    ... a video file shot with my Samsung Digimax A5 camera, the application (finder, quicktime player or iphoto) just maximizes the cpu usage, and hangs. And I have to close it by force quit.
    However, the files are not corrupted, VLC Player plays them without problem, and also provides the following codec information:
    FLUX0 (video)
    Codec: MJPG
    Res.: 640x480
    30 fps
    FLUX1 (audio)
    Codec: MLAW
    Channels: 1
    Freq: 8000hz
    Bits per sample: 8
    64kbit/s
    (maybe I translated some properties wrong, I use french Os X)
    Since nearly every action (spotlight search, opening iphoto, trying to import files to the iphoto library, etc.) encounters with a file like this, and hangs the application, this really makes my life ****.
    Any suggestions?

    up

  • PCUI Advanced Search Refresh / Trigger by Event

    Hello,
    I created an Advanced Search in the Case Management PCUI. But the search is only started when I change the selection in the shuffler drop-down list. I would like to add a refresh button that triggers the search again, starts a new query and updates the list, since new cases are automatically created by a workflow in the background. There is a REFRESH event, but the PCUI manuals says it should not be used. Any ideas?
    thanks,
    Jari

    How can I make changes to the properties XML and keep multi language support for the Advanced Search Box?
    I am wondering this as well. It doesn't look like there's a good way to translate Managed Properties in SP2013. So we have untranslated text for Refiners, result sort options, and Advanced Search properties.
    It looks like site translation (resources file) should do this, but A) the option is only presented if Publishing is enabled, and B) it doesn't seem to be working anyway.
    The best solution I can come up with is to translate everything dynamically using JavaScript. I'm sure there's a better way, but I haven't been able to find it.

  • Absolute pôsitionning vs custom layout using custom constraints

    Hello,
    Context:*
    my team has developped a custom PlanningPanel that show a kind of time sheet or planning: this display shows "task" objects (which represent operations performed by industrial equipments) and "result" objects (which represent the products and byproducts of the operations).
    We needed rather simple edition functionalities, not a full-fledged Gantt-diagram (critical path highlighting, etc), so we dismissed trying to find a planning edition library and we went our own way.
    We decided on absolute positionning (null Layout). It was a lot of work, but has worked quite well, until recent maintenance caused some regressions, and proved a bit hard to evolve.
    I'm afraid I can't post an SSCCE; what I want to do in this thread is discuss alternatives (what other solutions did we have, or could we switch to). I may be spwaning dedicated forum threads to ask on specific issues.
    Requirements:*
    Display:
    - each task is on its own line (and the x axis represents the clock)
    - several tasks can have a common clock span (they are executed in parallel)
    - each task shows up as a rectangle
    - results shows as icons under their task
    - contextual tooltips are displayed when hovering over the tasks/results areas
    Edition:
    - the user can select a task, or a result (and edit a contextual form)
    - resize the rectangles (which edits the task duration)
    - move (drag and drop) a task, moving its results along (changes the start time and end time, or reorder lines for clarity)
    - define dependencies (so that one task's inputs are made of former tasks' results) as connecting lines.
    The system is also used to drive the task execution (generates command scripts for task-specific systems and spawns the adequate processes). The application provides a read-only view of the tasks in action (for monitoring purposes), which shows each task as a colored rectangle that fills up as the process advances
    - the monitoring view enable to select a task/result to open a detailed state view, or pause/resume a task
    - but the user can not add/delete/move anything
    - Both editor and monitor views are close enough so that we wanted to factor the layout code
    Design Choice(s):*
    The developper decided on absolute positionning across the whole panel.
    Thinking back, the lines could easily have been laid out in a GridLayout, but for the rest, it seemed a good option.
    Thinking further, here are the alternatives I may have proposed (the app is in production as of today, but it is still possible to rework the thing along the next version if it decreases maitenance costs).
    - initial thought: custom PlanningPanel with one big paint method. The paintComponent() would use the model to draw the appropriate rectangles on its Graphics2D.
    - the current solution: custom PlanningPanel with absolute positionning of children panels: the PlanningPanel has a null Layout, its children are TaskPanel and ResultPanel instances, which are positionned manually (+setBounds()+).
    - custom Panel with Renderers: there would be only one panel, whose paintComponent() method would use a couple of flyweight TaskRenderer and ResultRenderer.
    - custom LayoutManager: there would be only one regular JPanel, whose Layout would be a custom PlanningLayout, that knows how to translate TaskModel properties (start time, duration,...) into coordinates
    In all cases above the dependency lines are drawn in the main panel's paintComponent(). The lines could also have been empty non-opaque JPanels, laid out consistently, and overriding their paintComponent() that would simply draw the appropriate diagonal.
    In all cases, the coordinates are computed by custom code, based on the properties of the tasks, and the moderate complexity of this computing is the same in all cases, provided their is a handy mapping between each "widget" and its corresponding entity (+TaskModel+, ResultModel).
    The approaches merely differ in how they integrate with event and repaint handling.
    We considered the Renderer approach, but I was afraid it would complicate the interactions (DnD, resizing, click, even contextual tooltip), same thing for the big paint method approach.
    It still think the current model where each task and result is an instane of some subclass of JComponent is quite straightforward in this regard:
    theTaskPanel.addMouseListener(new MouseListener() {
        public void mouseClicked(...) {
            contextualFormArea.showFormForTask(theTaskPanel.getTaskId());
    });Moreover, both first two approaches would have made it harder to "optimize" the drawing (painting only the areas that need change).
    The current solution works nicely on these aspects. However it exhibits some erratic problems, such as:
    - some tasks are blank rectangles when the planning panel is scrolled within a JScrollPane, whereas the correct painting comes back when the window is resized.
    - sometimes the contextual tooltip shows another task's state
    What I haven't considered until that day is developping a custom LayoutManager. I naivley think this might correct the painting problems or at least isolate it, as it would separate the positionning and the "edition" codes (the custom PlanningPanel contains methods to add a task, create IDs, handle drop points,... and is a fairly big intimidating class.
    Indeed it seems this separation would be the main advantage of the custom LayoutManager.
    The painting code (filling rectangles, switching colors), is mostly separated already, in TaskPanel and ResultPanel.
    --> I am correct so far? Any other alternative? Any argument pro/against the custom LayoutManager approach?*
    In particular, is it worth the trouble to devise a custom Layoutmanager that has only two use cases?
    Edited by: jduprez on May 28, 2009 11:24 AM

    Thank you for following up (and forgiving my interference in your own thread).
    However I disagree with most of your arguments.
    What you described seems to fit with the Model-View-Controller pattern with some nice OOD thrown in :).Sorry, I don't understand this sentence.
    1) Constraint objects may be over-engineering the problemDesigning Constraint as Adapters may be a bit far-fetched, right, but I think designing Constraints helps in making the layout reusable (remember, the layout would be used to represent two sets of entities whose classes have no inheritance relationship).
    2) Use a Grid Layout if that makes life easier, otherwise use a custom layout. I mentioned GridLayout about vertically stacking "lines" of tasks, but a GridLayout sure doesn't fit putting task widgets of different width (duration) on a horizontal timeline.
    i think it may be more clean to simply override the size methods (min, max pref size, etc.) that the layout manager will call and calculate the desired size there (or have them call a method that does it and return that.) This way, each object knows how to provide its desired size instead of relying on some other [constraint] object to provide it.Thank you for this suggestion. This is an interesting point of view, I'll think more about it, but on first read it doesn't seem to fit for several reasons.
    - this assumes the object has all the information necessary to compute its, say, preferred size. That's not the case out of the box: there is this "scale factor", that currently is known by the container, and there's also the constraint that a task with results is drawn thinner so that the result icons fit underneath. You couldn't guess those constraints, and admittedly I could rework my TaskPanel so that it receives the missing info
    - I think it would go contrary to what a LayoutManager generally does. Think about GridLayout: each child component has no clue as to how big it will render. And the GridLayout silently ignores all desired (min/max/pref'd) sizes. The LayoutManager has all the info (the list of children, their desired sizes, additional constraints, and the layout-specific rules) and arbitrates between desired sizes, which are no more than suggestions.
    - In particular, I don't se what it brings to split "how big am I" and "where do I go" across two classes, especially since in my case both will essentially convert times or durations into numbers of pixels.
    - Eventually, I have two situations, with in particular two "duration-dependant widgets" (TaskDefinitionPanel and TaskExecutionPanel). Reusing the same layout logic (duration/width conversion included) forces them to share some code (be it to delegate to a common class).
    To summarize, put the "How big am I?" code in the over-ridden size methods, and the "where do I go?" code in the layout manager.I understand you refer to my specific situation (because this maxim, although it sounds well, is not a correct description of how standard LayoutManagers work). Thank you for the refreshing point of view, but I think I'll keep the size code out of the widget classes (they already contain the painting and event-handling logic).
    Thank you anyway. Regards.
    J.

  • Template Failure

    I have been using DWCS4 for two years on my Windows 7 laptop successfully.
    Recently, a little blue and gold shield has been attached to the shortcut icon on the taskbar. The icon in All programs lost it's artwork and appeared as unrecognized.
    When this happened, my templates no longer translate the properties to the newly created pages. The fonts are wrong and the colors for the background were white not gold like they always had previously.
    I ran a thorough virus scan on my entire computer and then again on the program itself, both reported no errors.
    I  need help quickly, my sites are not updateable because when I update the templates they lose the original properties.
    Just so you know I have also posted this on Windows 7 Knowledge Base in case it is a Windows 7 update problem.
    Has anyone else experienced this?

    Please ensure your Template contains valid code and paths are correctly pointing to files in your site folder.
    Code Validation Tools
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    JavaScript - http://www.jslint.com/
    PHP -  http://phpcodechecker.com/
    If this problem occured immediately following a Windows7 update, Windows Restore may be used to rollback your system to a point before the update.
    http://www.computerhope.com/issues/ch001334.htm
    Hope this helps,
    Nancy O.

  • Resource Bundle for Detailed Navigation

    Hi All,
    I am trying to modify the text "Detailed Navigation".I was not able to find the Resource Bundle for that.can any one let me know the location for the resource Bundle for changing the Detailed navigation text.
    Thanks,
    sk

    Hi,
    Up until now, there was no resource bundle for admin properties in a portal component. Properties were defined as component properties in the portalapp.xml (in english). Once you created an iView, you could then translate the properties in the PCD (for example, with translation worklist).
    This will change with an upcoming version -- perhaps 2004s SP14.
    Hope this helps and I understood your situation correctly.
    Daniel

  • Regarding bundle file

    Dear all
    can some one explain me what bundle file is.. and how is it helpful or related to resource type or item types and to dependent properties (to categorize the documents in the repository)
    steps in detail would be more helpful
    points will be rewarded for any help
    with regards
    swetha

    Hi Swetha,
    Go through the following links for a better understanding of bundle files:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/42/ead6d6515a6a1fe10000000a114cbd/frameset.htm">Defining Bundle Files</a>
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3e7221c0-0d01-0010-1f97-c28cf19fc90d">How To…translate CM properties</a>
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30deb229-d570-2910-4aaf-8858e0660f05">How To translate CM properties by using Resource Bundles</a>
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=432251">https://www.sdn.sap.com/irj/sdn/thread?threadID=432251</a>
    Regards,
    Ankit

  • Sharing Document between TableEditor and JTextArea

    hi,
    i'm trying to share a javax.swing.text.Document between a TableCellEditor and a JTextArea, so that both, the textarea and the tableeditor show the same text, regardless of where the user is typing.
    At the moment I'm doing this: every time the selection of the table changes, i get the document from the table editor and assign it to the textarea. This construct seems wo work, but only in one direction: if i type text into the table cell, the textarea gets updated, but not the other way round.
    any idea, what could be wrong?
    some code:
    public void valueChanged(ListSelectionEvent e) {
        if(e.getValueIsAdjusting()) {
            int row = table.getSelectedRow();
            JTextComponent txtComp = (JTextComponent) table.getCellEditor(row, TRANSLATED_COL).getTableCellEditorComponent(table, "", true, row, TRANSLATED_COL);
            translatedTextArea.setDocument(txtComp.getDocument());
            showItem(row);
    }

    sorry for my late response. here is an example:
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.util.Enumeration;
    import java.util.Properties;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextArea;
    import javax.swing.ListSelectionModel;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.text.JTextComponent;
    public class TranslatorPanel extends JPanel implements TableModelListener, ListSelectionListener {
         public static final int ITEM_COL = 0;
         public static final int TRANSLATED_COL = 1;
        private JTable table;
        private DefaultTableModel model;
        private JTextArea translatedTextArea = new JTextArea();
        public TranslatorPanel() {
            initGUI();
        private void initGUI() {
            model = new DefaultTableModel(new Object[][] {}, new String[] {"Key","Value"});
            model.addTableModelListener(this);
            table = new JTable(model) {
                 public boolean isCellEditable(int row, int col) {
                      return col == TRANSLATED_COL;
            table.setSurrendersFocusOnKeystroke(true);
            table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            table.getSelectionModel().addListSelectionListener(this);
            setLayout(new BorderLayout());
            add(new JScrollPane(table), BorderLayout.CENTER);
            add(new JScrollPane(translatedTextArea), BorderLayout.SOUTH);
            setSize(800,600);
            translatedTextArea.setPreferredSize(new Dimension(800, 300));
            TranslationItem item = new TranslationItem("key1");
            item.setTranslations("value1", "en");
            model.addRow(new Object[] {item, item.getTranslation("en")});
            item = new TranslationItem("key2");
            item.setTranslations("value2", "en");
            model.addRow(new Object[] {item, item.getTranslation("en")});
            item = new TranslationItem("key3");
            item.setTranslations("value3", "en");
            model.addRow(new Object[] {item, item.getTranslation("en")});
        // called, if the content of the table has changed
         public void tableChanged(TableModelEvent e) {
            int row = e.getLastRow();
            if (e.getType() == TableModelEvent.UPDATE) {
                 // store the new value in the item
                 TranslationItem item = (TranslationItem) model.getValueAt(row, ITEM_COL);
                 item.setTranslations((String)model.getValueAt(row, TRANSLATED_COL), "en");
         // called if selection of the table changes
         public void valueChanged(ListSelectionEvent e) {
              if(e.getValueIsAdjusting()) {
                   int row = table.getSelectedRow();
                   JTextComponent txtComp = (JTextComponent) table.getCellEditor(row, TRANSLATED_COL).getTableCellEditorComponent(table, "", true, row, TRANSLATED_COL);
                   translatedTextArea.setDocument(txtComp.getDocument());
                   showItem(row);
         private void showItem(int row) {
              TranslationItem item = (TranslationItem) model.getValueAt(row, ITEM_COL);
              translatedTextArea.setText(item.getTranslation("en"));
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.setSize(800,600);
            frame.add(new TranslatorPanel());
            frame.setVisible(true);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        private class TranslationItem implements Comparable {
            private String key = null;
            private Properties translations = new Properties();
            public TranslationItem(String key) {
                this.key = key;
            public String getKey() {
                return key;
            public void setKey(String key) {
                this.key = key;
            public String getTranslation(String locale) {
                String value = translations.getProperty(locale);
                return value == null ? "" : value;
            public boolean translatedForLocale(String locale) {
                String translation = getTranslation(locale);
                if(translation == null || translation.length() <= 0) {
                    return false;
                } else {
                    return true;
            public void setTranslations(String translation, String locale) {
                translations.setProperty(locale, translation);
            public String toString() {
                return key;
            public void print() {
                System.out.println("key " + key);
                Enumeration en = translations.propertyNames();
                while (en.hasMoreElements()) {
                    String locale = (String) en.nextElement();
                    String translation = translations.getProperty(locale);
                    System.out.println("\t"+locale+" = " + translation);
            public int compareTo(Object o) {
                if(o instanceof TranslationItem) {
                    TranslationItem ti = (TranslationItem) o;
                    return ti.getKey().compareTo(getKey());
                return 0;
    }

  • Translation of layout set properties

    Hello,
    I created a custom layout set to display customized properties: size, date of creation and date of last modification.
    All is good, except that i need to translate column headers to different languages. I added them in collection renderer settings (displayed proeprties: contentlength, created, modified)
    I know how to do translate using Portal Content Translation, but these translation are for portal content items only. How do i translate those  i.e column header names)
    Any help will be appreciated!

    Wrong space, this is the Netweaver Gateway space - nothing to do with Portal Content!

Maybe you are looking for