MCPcopy Index your code
hub / github.com/MapServer/MapServer / msOWSGetLanguage

Function msOWSGetLanguage

mapows.c:757–776  ·  view source on GitHub ↗

msOWSGetLanguage() ** ** returns the language via MAP/WEB/METADATA/ows_language ** ** Use value of "ows_language" metadata, if not set then ** return "undefined" as a default */

Source from the content-addressed store, hash-verified

755** return "undefined" as a default
756*/
757const char *msOWSGetLanguage(mapObj *map, const char *context)
758{
759 const char *language;
760
761 /* if this is an exception, MapServer always returns Exception
762 messages in en-US
763 */
764 if (strcmp(context,"exception") == 0) {
765 language = MS_ERROR_LANGUAGE;
766 }
767 /* if not, fetch language from mapfile metadata */
768 else {
769 language = msLookupHashTable(&(map->web.metadata), "ows_language");
770
771 if (language == NULL) {
772 language = "undefined";
773 }
774 }
775 return language;
776}
777
778/*
779** msOWSPrintMetadata()

Callers 4

msWCSException20Function · 0.85
msWFSException11Function · 0.85
msWCSException11Function · 0.85
msSOSExceptionFunction · 0.85

Calls 1

msLookupHashTableFunction · 0.85

Tested by

no test coverage detected