+ Start a Discussion
Miriam LückeMiriam Lücke 

Multi-language visualforce table display

I have a visualforce to be rendered as pdf. It displays child records in a table. The language of the rendered pdf is based on a picklist from the parent record.
When the language is set to english, the table displays fine:
english table in pdf
When the language is set to german, the table displays distorted:
german table in pdf
The respective excerpt of my vf source code:
<!-- Start Discussion Points-->
        <table rules="rows" styleClass="table" cellpadding="4px">
            <tr>
                <td colspan="5"  style="font-weight:bold; text-align: left;font-size:11pt;"> {!$ObjectType.Discussion_Points__c.label}</td>
            </tr>
            <tr>
                <td class="col1"><strong>{!$ObjectType.Discussion_Points__c.fields.Name.label}</strong></td>
                <td class="col34"><strong>{!$ObjectType.Discussion_Points__c.fields.Category__c.label}</strong></td>
                <td class="col2" ><strong>{!$ObjectType.Discussion_Points__c.fields.Summary__c.label}</strong></td>
                <td class="col34"><strong>{!$ObjectType.Discussion_Points__c.fields.Responsible_selection__c.label}</strong></td>
                <td class="col34"><strong>{!$ObjectType.Discussion_Points__c.fields.Due_Date__c.label}</strong></td>
            </tr>
            <!-- Due_Date__c, Internal_use_only__c, No__c, Responsible_contact__c, Responsible_selection__c, Responsible_user__c, Subject__c, Summary__c, Trip_Report__c, Name   -->                                       
            <apex:repeat value="{!TripRepPoints}" var="item">
                <apex:outputpanel rendered="{!NOT(item.internal_use__c)}" >
                    <tr>
                        <td class="col1"><apex:outputfield value="{!item.Name}" /></td>
                        <td class="col34"><apex:outputfield value="{!item.Category__c}" /></td>
                        <td class="col2"><apex:outputfield value="{!item.Summary__c}" /></td>
                        <td class="col34"><apex:outputfield value="{!item.Responsible_company__c}" /></td>
                        <td class="col34"><apex:outputfield value="{!item.Due_Date__c}" /></td>
                    </tr>
                </apex:outputpanel>
            </apex:repeat>
        </table>        
<!-- End Discussion Points-->
And the related css:
.col1 {
 width: 15%;
 vertical-align: top;
 font-weight: bold;
 font-size: 10pt; 
 border-bottom: 1px solid #CCC;
 }
.col2 {
 border-left: 1px solid #CCC;
 border-right: 1px solid #CCC;
 border-bottom: 1px solid #CCC;
 width: 40%;
 font-size: 10pt; 
 vertical-align:top;
 
 }
.col34 {
 border-left: 1px solid #CCC;
 border-bottom: 1px solid #CCC;
 width: 15%;
 font-size: 10pt; 
 vertical-align:top;
 }

Maybe anyone has an idea why this happens?

Many thanks in advance!
 
Robert ZentgrafRobert Zentgraf
Hi Miriam,

instead of the field name, you can write the text in the head of the table:
e. g.: <apex:outputText value="Subject" /> or only Subject

Regards
Robert
(mindforce: http://www.mind-force.de)
Miriam LückeMiriam Lücke
In a multi language environment I can't use static texts, so your suggestion might not help. Am Mittwoch, 21. Januar 2015 schrieb Salesforce Developer Community :
Robert ZentgrafRobert Zentgraf
Can you use an IF- or Case-function for the outputtext?