# Using projectresources in IMFWorkplaceBootstrapInfoProvider2

**URL:** <https://techcommunity.softwareag.com/t/using-projectresources-in-imfworkplacebootstrapinfoprovider2/57152>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [January 27, 2006, 3:06am UTC](https://techcommunity.softwareag.com/t/using-projectresources-in-imfworkplacebootstrapinfoprovider2/57152 "2006-01-27T03:06:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serhat](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Serhat](https://techcommunity.softwareag.com/u/Serhat)\
**Post date:** [January 27, 2006, 3:06am UTC](https://techcommunity.softwareag.com/t/using-projectresources-in-imfworkplacebootstrapinfoprovider2/57152/1 "2006-01-27T03:06:51Z")

</div>

Hi ,  
I want to prepare my function list for multilanguage environment.In order to do this I’m calling replaceLiteralFunction of currently processing adapter class.

```auto
public MFWorkplaceInfo getWorkplaceInfo(IMFWorkplaceBootstrapInfo envInfo) { 
...
... 
Adapter ca = envInfo.getCISessionContext().getCurrentlyProcessedAdapter(); 
...
...
 topic = new MFWorkplaceTopic(ca.replaceLiteral("ADFManagerWorkplace","system"), workplaceInfo);
 ...
...
}
```

I don’t know if it’s the rigth way.I couldn’t find another way.  
As I seen currently processed adapter accepts that the base path is /HTMLBasedGUI . So I had to place my literal classes and images under HTMLBasedGUI .  
Is there a way to use resources of my own project in IMFWorkplaceBootstrapInfoProvider2 implementation ?

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [January 27, 2006, 9:14pm UTC](https://techcommunity.softwareag.com/t/using-projectresources-in-imfworkplacebootstrapinfoprovider2/57152/2 "2006-01-27T21:14:48Z")

</div>

Well it’s a very tricky way (and it works with some problem as you mentioned…) but it’s not 100% correct. ReplaceLiteral should be used only inside the adapter processing.  
Pleas go on in the following way:

envInfo.getCISessionContext().getLanguage() gives you the currently active language

Then directly go to MultiLanguage Manager and pick the language from there. I just show you the code for the replaceLiteral() method that you already know about as example how to access:

```
public String replaceLiteral(String application,
                                String literal)
{
	return MLManagerFactory.
           getMLManager().getString(m_sessionContext.getLanguage(),
                                    m_pageContextRoot,
                                    application,
                                    literal);
}

```

In your case “m\_pageContextRoot” is the name of your CAI project, and the language is the one you previously got from envInfo.

…hope this helps…

Bjoern

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/using-projectresources-in-imfworkplacebootstrapinfoprovider2/57152/3 "2021-04-02T14:38:26Z")

</div>


