on 12-30-2009 2:47 PM
Using the command GetRepositoryRegionListCommand, I am able to see the following region details from our MDM Repository.
Locale Region Code Name
en_US engUSA English [US]
en_GB eng___ English [GB]
nl_NL nld___ Dutch [NL]
fr_FR fre___ French [FR]
de_DE ger___ German [DE]
it_IT ita___ Italian [IT]
es_ES spa___ Spanish [ES]
zh_CN chi___ Chinese [CN]
ja_JP jpn___ Japanese [JP]
no_NO nor___ Norwegian [NO]
pl_PL pol___ Polish [PL]
pt_PT por___ Portuguese [PT]
ru_RU rus___ Russian [RU]
When establishing a UserSession, the only region code that appears to work is 'engUSA'. Has anyone else had success using regions other than 'engUSA'?
MDM_REGION_PROPERTIES.setLocale(Locale.ENGLISH);
MDM_REGION_PROPERTIES.setName("English [US]");
MDM_REGION_PROPERTIES.setRegionCode("engUSA"); // error when not 'engUSA'
Furthermore, if I print the RecordId object, .toString(), I see what appear to be region codes for multilingual text field:
Record
{
ID=R1
Fields=
{
F24_30=
{
fre___ = Catégorie 1,
ger___ = Kategorie 1,
engUSA = Category 1
},
F170_4198=screw-gun-box
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eujvari,
were you able to resolve this issue?
I am getting a similar error while updating a multi-lingual field, can you please help!
Exception 1:java.lang.IllegalArgumentException: Value for region code 'por___' was not populated or such region code is not specified for repository
what is the right region code for Portugal and Mexico?
Basically no region works except engUSA.
Thanks,
Jyotika
HI Guys
It might be helpful who looked into this query. I have pasted the successful dynamic population for the region codes based on the browser language
Locale sessionlocal = WDResourceHandler.getCurrentSessionLocale();
RegionProperties regionProperties; | ||
regionProperties = new RegionProperties(); | ||
// | ||
// | regionProperties.setRegionCode("engUSA"); | |
// | regionProperties.setLocale(new Locale("en","US")); | |
// | regionProperties.setName("US"); | |
/***********************************************************************************************************************/ | ||
RegionProperties[] regionProp =null; |
GetRepositoryRegionListCommand getRepRegCmd =
new GetRepositoryRegionListCommand(mySimpleConnection);
getRepRegCmd.setRepositoryIdentifier(repId);
try {
getRepRegCmd.execute();
} catch (CommandException e4) {
// TODO Auto-generated catch block
wdComponentAPI.getMessageManager().reportException(""+e4.getLocalizedMessagesTrace());
}
regionProp = getRepRegCmd.getRegions();
for(int i=0;i<regionProp.length;i++)
{
if(regionProp[i].getLocale().getLanguage().equals(sessionlocal.getLanguage()))
{
regionProperties.setRegionCode(regionProp[i].getRegionCode());
break;
}
}
regionProperties.setLocale(new Locale(sessionlocal.getLanguage(), sessionlocal.getCountry()));
regionProperties.setName(sessionlocal.getISO3Country());
Hope this will works. Because it is generic code for every browser.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.