function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Thomas StrohThomas Stroh 

VF & Localization

I am just starting out with Visual Force, but want to make sure I handle localization appropriately. I created a very simple VF example below, where I'm trying to redefine the Account home tab.

 

I'm hoping someone can show me how to access "standard" SFDC text values so that I do not have to create "Custom Labels" to  handle localization. I am not talking about standard object field names, because you can see below I can access localize fields without issue. I want to access text values that SFDC has already localized in their application ... i.e. View, Home, Go!, Search, Setup, Help, Logout, etc.  Not that I need all of these, but if I want to put the text "Home" on my VF page, why not leverage what SFDC has already localized?

 

You can see in my example below, the items highlighted in "Red" I created as "Custom Labels" and the "Go!" value is just hard-coded.

 

Any help is greatly appreciated!

 

Thanks

 

<apex:page standardController="Account" recordSetVar="accounts">
<apex:sectionHeader title="{!$ObjectType.Account.Label}" subtitle="{!$Label.Home}" />
<apex:form >
<apex:outputLabel >
<b>{!$Label.View}:</b>
</apex:outputLabel>
<apex:selectList value="{!filterid}" size="1">
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
<apex:commandButton value="Go!" action="{!list}"/>
</apex:form>
</apex:page>

 


 

paul-lmipaul-lmi
bump for this one, and also, I'd like to know how to access standard field labels, like Contact.Email or Account.Name.
dmsx2oddmsx2od

Here's a taste:

 

<apex:outputtext value="{!$ObjectType.account.fields.name.label}:" />

 

For more information, see http://www.x2od.com/2009/03/23/flexible-field-labels.html