!--a11y-->
Resource Bundle Access from a Portal Component

The following is example code, showing how you can access a resource bundle from a portal component Java code. In this example, the corresponding PAR file must contain a resource bundle for each supported language.
import com.sapportals.portal.prt.component.*; import com.sapportals.portal.prt.resource.*; import java.util.ResourceBundle;
public class HelloWorldComponent extends AbstractPortalComponent {
public void doContent( IPortalComponentRequest request, IPortalComponentResponse response) { java.util.ResourceBundle resource = request.getResourceBundle(); response.write(resource.getString("GREETING")); } |
