diff --git a/src/main/scala/code/lib/ObpAPI.scala b/src/main/scala/code/lib/ObpAPI.scala
index 31be540a..d4bcee2f 100644
--- a/src/main/scala/code/lib/ObpAPI.scala
+++ b/src/main/scala/code/lib/ObpAPI.scala
@@ -378,7 +378,7 @@ object ObpAPI extends Loggable {
//Note: ?content=static&content=dynamic
// if there are two content parameters there, only the first one is valid for the api call.
// so requestParams have the high priority
- val requestParams = List("tags", "locale", "language", "functions", "content", CacheModifier)
+ val requestParams = List("tags", "locale", "functions", "content", CacheModifier)
.map(paramName => (paramName, S.param(paramName)))
.collect{
case (paramName, Full(paramValue)) if(paramValue.trim.size > 0) => s"$paramName=$paramValue"
@@ -428,7 +428,7 @@ object ObpAPI extends Loggable {
//Note: ?content=static&content=dynamic
// if there are two content parameters there, only the first one is valid for the api call.
// so requestParams have the high priority
- val requestParams = List("tags", "language", "functions", CacheModifier)
+ val requestParams = List("tags", "locale", "functions", CacheModifier)
.map(paramName => (paramName, S.param(paramName)))
.collect{
case (paramName, Full(paramValue)) if(paramValue.trim.size > 0) => s"$paramName=$paramValue"
@@ -476,7 +476,7 @@ object ObpAPI extends Loggable {
//Note: ?content=static&content=dynamic
// if there are two content parameters there, only the first one is valid for the api call.
// so requestParams have the high priority
- val requestParams = List("tags", "language", "functions", "content", CacheModifier)
+ val requestParams = List("tags", "locale", "functions", "content", CacheModifier)
.map(paramName => (paramName, S.param(paramName)))
.collect{
case (paramName, Full(paramValue)) if(paramValue.trim.size > 0) => s"$paramName=$paramValue"
diff --git a/src/main/scala/code/snippet/ApiExplorer.scala b/src/main/scala/code/snippet/ApiExplorer.scala
index 8d6fa960..76fe480b 100644
--- a/src/main/scala/code/snippet/ApiExplorer.scala
+++ b/src/main/scala/code/snippet/ApiExplorer.scala
@@ -192,9 +192,9 @@ WIP to add comments on resource docs. This code copied from Sofit.
logger.info(s"rawTagsParam is $rawTagsParam")
- val rawLanguageParam = S.param("language")
+ val localeParam = S.param("locale")
- logger.info(s"rawLanguageParam is $rawLanguageParam")
+ logger.info(s"localeParam is $localeParam")
def apiCollectionIdParamString = if (apiCollectionIdParam.isEmpty) "" else "&api-collection-id=" + apiCollectionIdParam.mkString(",")
@@ -204,9 +204,9 @@ WIP to add comments on resource docs. This code copied from Sofit.
logger.info(s"tagsParamString is $rawTagsParam")
- val languagesParamString = if (rawLanguageParam.isEmpty) "" else "&language=" + rawLanguageParam.mkString(",")
+ val localeParamString = if (localeParam.isEmpty) "" else "&locale=" + localeParam.mkString(",")
- logger.info(s"languagesParamString is $languagesParamString")
+ logger.info(s"localeParamString is $localeParamString")
val rawContentParam = S.param("content")
@@ -244,7 +244,7 @@ WIP to add comments on resource docs. This code copied from Sofit.
case _ => ""
}
- val languageHeadline : String = rawLanguageParam match {
+ val localeHeadline : String = localeParam match {
case Full(x) => x
case _ => ""
}
@@ -441,13 +441,13 @@ WIP to add comments on resource docs. This code copied from Sofit.
val baseVersionUrl = s"${OAuthClient.currentApiBaseUrl}"
// Link to the API endpoint for the resource docs json TODO change apiVersion so it doesn't have a "v" prefix
- val resourceDocsPath = s"${OAuthClient.currentApiBaseUrl}/obp/v1.4.0/resource-docs/${apiVersion.stripPrefix("v")}/obp?${tagsParamString}${languagesParamString}${contentParamString}"
+ val resourceDocsPath = s"${OAuthClient.currentApiBaseUrl}/obp/v1.4.0/resource-docs/${apiVersion.stripPrefix("v")}/obp?${tagsParamString}${localeParamString}${contentParamString}"
// Link to the API endpoint for the swagger json
- val swaggerPath = s"${OAuthClient.currentApiBaseUrl}/obp/v1.4.0/resource-docs/${apiVersion.stripPrefix("v")}/swagger?${tagsParamString}${languagesParamString}${contentParamString}"
+ val swaggerPath = s"${OAuthClient.currentApiBaseUrl}/obp/v1.4.0/resource-docs/${apiVersion.stripPrefix("v")}/swagger?${tagsParamString}${localeParamString}${contentParamString}"
- val chineseVersionPath = "?language=zh"
- val allPartialFunctions = s"/partial-functions.html?${apiVersionParamString}${tagsParamString}${languagesParamString}${contentParamString}"
+ val chineseVersionPath = "?locale=zh_CN"
+ val allPartialFunctions = s"/partial-functions.html?${apiVersionParamString}${tagsParamString}${localeParamString}${contentParamString}"
//Note > this method is only for partial-functions.html .
def showPartialFunctions = {
@@ -834,7 +834,7 @@ WIP to add comments on resource docs. This code copied from Sofit.
// Title / Headline we display including count of APIs
val headline : String = s"""
${apiVersionRequested.stripPrefix("OBP").stripPrefix("BG").stripPrefix("STET").stripPrefix("UK")}
- $tagsHeadline $languageHeadline $contentHeadline $implementedHereHeadline (${resources.length} APIs)
+ $tagsHeadline $localeHeadline $contentHeadline $implementedHereHeadline (${resources.length} APIs)
""".trim()
@@ -1088,7 +1088,7 @@ WIP to add comments on resource docs. This code copied from Sofit.
}
- val thisApplicationUrl = s"${CurrentReq.value.uri}?version=${apiVersionRequested}&list-all-banks=${listAllBanks}${tagsParamString}${languagesParamString}${contentParamString}${apiCollectionIdParamString}"
+ val thisApplicationUrl = s"${CurrentReq.value.uri}?version=${apiVersionRequested}&list-all-banks=${listAllBanks}${tagsParamString}${localeParamString}${contentParamString}${apiCollectionIdParamString}"
val obpVersionUrls: List[(String, String)] = obpVersionsSupported.map(i => (i.replace("OBPv", "v"), s"?version=${i}&list-all-banks=${listAllBanks}"))
diff --git a/src/main/scala/code/snippet/WebUI.scala b/src/main/scala/code/snippet/WebUI.scala
index 3f466c54..73613860 100644
--- a/src/main/scala/code/snippet/WebUI.scala
+++ b/src/main/scala/code/snippet/WebUI.scala
@@ -76,8 +76,8 @@ class WebUI extends MdcLoggable {
"a *" #> scala.xml.Unparsed(year)
}
def selectedLocale: CssSel = {
- val language = I18NUtil.currentLocale().getLanguage()
- s"#${language.toLowerCase()} *" #> scala.xml.Unparsed(s"${language.toUpperCase()}")
+ val localeLanguage = I18NUtil.currentLocale().getLanguage()
+ s"#${localeLanguage.toLowerCase()} *" #> scala.xml.Unparsed(s"${localeLanguage.toUpperCase()}")
}
/*