@@ -28,15 +28,31 @@ function(action, entity, config){
28
28
fcIdentifier <- paste0(entity $ identifiers [[" id" ]]," _dsd" )
29
29
# produce feature catalogue
30
30
fc <- ISOFeatureCatalogue $ new(uuid = fcIdentifier )
31
- fc $ setName(paste0(entity $ titles [[" title" ]], " - Feature Catalogue" ))
32
- fc $ addFieldOfApplication(" Open Science" )
31
+ fc_title_locales <- geoflow :: get_locales_from(entity $ titles [[" title" ]])
32
+ if (! is.null(fc_title_locales )){
33
+ fc_title_locale_names <- names(fc_title_locales )
34
+ fc_title_locales <- lapply(fc_title_locales , function (x ){paste0(x , " - Feature Catalogue" )})
35
+ names(fc_title_locales ) <- fc_title_locale_names
36
+ }
37
+ fc $ setName(paste0(entity $ titles [[" title" ]], " - Feature Catalogue" ), locales = fc_title_locales )
33
38
fc $ addFieldOfApplication(" FAIR" )
34
39
versionDate <- as.POSIXct(Sys.time())
35
40
versionNumber <- format(versionDate , " %Y%m%dT%H%M%S" )
36
41
fc $ setVersionNumber(versionNumber )
37
42
fc $ setVersionDate(versionDate )
38
43
fc $ setFunctionalLanguage(entity $ language )
39
44
45
+ # locales (i18n/i10n support)
46
+ if (length(entity $ locales )> 0 ){
47
+ for (locale in entity $ locales ){
48
+ a_locale <- ISOLocale $ new()
49
+ a_locale $ setId(locale )
50
+ a_locale $ setLanguage(locale )
51
+ a_locale $ setCharacterSet(" utf8" )
52
+ fc $ addLocale(a_locale )
53
+ }
54
+ }
55
+
40
56
# add scopes
41
57
# --------------------------------------------------------------------------
42
58
# -> geoflow scope
@@ -77,7 +93,7 @@ function(action, entity, config){
77
93
res $ setLinkage(main_entity $ websiteUrl )
78
94
res $ setName(main_entity $ websiteName )
79
95
contact $ setOnlineResource(res )
80
- producer $ setContactInfo(contact )
96
+ producer $ setContactInfo(contact )
81
97
82
98
orcid = main_entity $ identifiers [[" orcid" ]]
83
99
if (! is.null(orcid )){
0 commit comments