1

I'm using SharePoint 2010 REST API and noticed the a unkonwn (at least to me and to my searches) translation function is applied over List Names which go in the URL and to Fields Names in the results.

Examples:

Display Name                                        |  Name in REST API                                           |   Type
----------------------------------------------------------------------------------------------------------------------------------
@ 3 _ asds SDF sdf WERW 134                         |  http://server/_vti_bin/ListData.svc/c_3_AsdsSDFSdfWERW134  |  List
Azeri (Cyrillic, Azerbaijan)                        |  AzeriCyrillicAzerbaijan                                    |  Field
Česky                                               |  Česky                                                      |  Field
Serbian (Cyrillic, Serbia and Montenegro (Former))  |  SerbianCyrillicSerbiaAndMontenegroFormer                   |  Field
Arabic (U.A.E.)                                     |  ArabicUAE                                                  |  Field
Chinese-2                                           |  Chinese2                                                   |  Field  
_Russian                                            |  c__Russian                                                 |  Field
Rom@ania                                            |  RomAnian                                                   |  Field
-Dutch                                              |  Dutch                                                      |  Field

The question: Are there any official rules for such name conversion?

Are there any other REST API call I could use to get a mapping list between Display Names and the Names I get in REST API results? ($metadata does not do that) This would be usefull in case there are name collisions.

Thoughts

It does not look like XML escaping, it does not look like they simply remove illegal characters for XML element names, it is not required for JSON either.

Why I need this?

I have a list with a column for each language, the Display Name will always be a CultureInfo.EnglishName, and I need to consume its data from other environment (still .NET/C# though) (that's why I'm using REST API).

I also had to moved away from WCF Proxy classes (I'm using a simple HttpWebRequest) because I need this to be dynamic, so If a new language is needed users just add it to the list and my code does not need to be changed, because my code will already take any CultureInfo as a parameter.

To the possible values I need (any CultureInfo.EnglishName), it looks like just removing spaces and parenthesis and capitalizing next character will do trick, but I'd like to know if there are any standards for this name convention and let my solution more bullet proof.

I did a lot of search on this, but only found some suggestions like I did above, no offical statement for Microsoft or docs in MSDN.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.