@sitevision/api 2.0.0-alpha.1 → 2023.2.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/client/requester/index.d.ts +10 -8
  2. package/client/toasts/index.d.ts +7 -5
  3. package/common/app/index.d.ts +45 -46
  4. package/common/events/index.d.ts +30 -31
  5. package/common/i18n/index.d.ts +7 -5
  6. package/common/router/index.d.ts +72 -77
  7. package/common/security/index.d.ts +27 -21
  8. package/index.d.ts +8 -0
  9. package/package.json +1 -1
  10. package/server/AliasUtil/index.d.ts +11 -9
  11. package/server/ArchiveUtil/index.d.ts +43 -41
  12. package/server/ArraysInstance/index.d.ts +1666 -1807
  13. package/server/ArticleUtil/index.d.ts +292 -224
  14. package/server/AuthenticationUtil/index.d.ts +72 -84
  15. package/server/BookmarkUtil/index.d.ts +74 -79
  16. package/server/BuddyIconRenderer/index.d.ts +123 -131
  17. package/server/BuddyIconRenderer.BuddyIconSize/index.d.ts +41 -0
  18. package/server/BuddyIconRenderer.BuddyIconSize/index.js +25 -0
  19. package/server/ClientUtil/index.d.ts +10 -8
  20. package/server/CollaborationFactory/index.d.ts +37 -40
  21. package/server/CollaborationGroupFolderUtil/index.d.ts +28 -26
  22. package/server/CollaborationGroupState/index.d.ts +27 -0
  23. package/server/CollaborationGroupState/index.js +11 -0
  24. package/server/CollaborationGroupTemplateUtil/index.d.ts +46 -48
  25. package/server/CollaborationGroupType/index.d.ts +28 -0
  26. package/server/CollaborationGroupType/index.js +12 -0
  27. package/server/CollaborationGroupUtil/index.d.ts +84 -80
  28. package/server/CollectionsInstance/index.d.ts +641 -704
  29. package/server/ColorUtil/index.d.ts +34 -35
  30. package/server/CompoundAndFilterBuilder/index.d.ts +28 -26
  31. package/server/CompoundComparatorBuilder/index.d.ts +33 -31
  32. package/server/CompoundOrFilterBuilder/index.d.ts +28 -26
  33. package/server/ContentNodeUtil/index.d.ts +34 -32
  34. package/server/CurrencyFactory/index.d.ts +70 -68
  35. package/server/DateUtil/index.d.ts +131 -141
  36. package/server/DecorationUtil/index.d.ts +11 -9
  37. package/server/DeviceUtil/index.d.ts +19 -17
  38. package/server/DimensionMode/index.d.ts +17 -0
  39. package/server/DimensionMode/index.js +12 -0
  40. package/server/DirectoryUtil/index.d.ts +87 -85
  41. package/server/DocType/index.d.ts +30 -0
  42. package/server/DocType/index.js +14 -0
  43. package/server/DocTypeUtil/index.d.ts +127 -133
  44. package/server/EndecUtil/index.d.ts +329 -346
  45. package/server/ExtendedDismaxParserBuilder/index.d.ts +153 -167
  46. package/server/FileIconRenderer/index.d.ts +152 -171
  47. package/server/FileUtil/index.d.ts +272 -298
  48. package/server/FilterBuilder/index.d.ts +39 -37
  49. package/server/FolderUtil/index.d.ts +91 -92
  50. package/server/FontUtil/index.d.ts +34 -35
  51. package/server/FormatterBuilderFactory/index.d.ts +73 -81
  52. package/server/HighlightBuilder/index.d.ts +76 -83
  53. package/server/IconUtil/index.d.ts +25 -23
  54. package/server/ImageLinkRenderer/index.d.ts +35 -33
  55. package/server/ImageRenderer/index.d.ts +340 -376
  56. package/server/ImageUtil/index.d.ts +245 -263
  57. package/server/IndexUtil/index.d.ts +38 -35
  58. package/server/IndexUtil.IndexType/index.d.ts +29 -0
  59. package/server/IndexUtil.IndexType/index.js +13 -0
  60. package/server/IndexingUtil/index.d.ts +67 -45
  61. package/server/InstanceCreatorUtil/index.d.ts +423 -459
  62. package/server/InstanceTypeUtil/index.d.ts +167 -188
  63. package/server/JwtUtil/index.d.ts +129 -127
  64. package/server/LandingPageUtil/index.d.ts +82 -85
  65. package/server/LandingPageUtil/index.js +1 -0
  66. package/server/LinkPageUtil/index.d.ts +294 -248
  67. package/server/LinkRenderer/index.d.ts +649 -713
  68. package/server/LinkTargetBuilder/index.d.ts +65 -73
  69. package/server/LinkValueBuilder/index.d.ts +66 -73
  70. package/server/ListWrapper/index.d.ts +80 -89
  71. package/server/LocaleUtil/index.d.ts +381 -393
  72. package/server/LogUtil/index.d.ts +118 -127
  73. package/server/MailBuilder/index.d.ts +106 -121
  74. package/server/MailUtil/index.d.ts +58 -63
  75. package/server/MathInstance/index.d.ts +624 -656
  76. package/server/MessageDigesterFactory/index.d.ts +28 -26
  77. package/server/MetadataDefinitionUtil/index.d.ts +77 -81
  78. package/server/MetadataUtil/index.d.ts +321 -345
  79. package/server/MimeTypeUtil/index.d.ts +208 -214
  80. package/server/MonitorBuilder/index.d.ts +17 -17
  81. package/server/NodeComparatorUtil/index.d.ts +214 -224
  82. package/server/NodeFactoryUtil/index.d.ts +19 -17
  83. package/server/NodeFilterUtil/index.d.ts +651 -738
  84. package/server/NodeIteratorUtil/index.d.ts +209 -224
  85. package/server/NodeResolverUtil/index.d.ts +398 -404
  86. package/server/NodeTreeUtil/index.d.ts +211 -226
  87. package/server/NodeTypeUtil/index.d.ts +1430 -546
  88. package/server/OfflineVersionPropertyUtil/index.d.ts +6 -4
  89. package/server/OnlineVersionPropertyUtil/index.d.ts +6 -4
  90. package/server/OutputUtil/index.d.ts +384 -379
  91. package/server/PageUtil/index.d.ts +264 -186
  92. package/server/PermissionUtil/index.d.ts +391 -428
  93. package/server/PermissionUtil.Permission/index.d.ts +54 -0
  94. package/server/PermissionUtil.Permission/index.js +38 -0
  95. package/server/PortletContextUtil/index.d.ts +111 -106
  96. package/server/PortletUtil/index.d.ts +30 -20
  97. package/server/PrincipalUtil/index.d.ts +33 -31
  98. package/server/Properties/index.d.ts +68 -75
  99. package/server/PropertyUtil/index.d.ts +1419 -1461
  100. package/server/PublishingUtil/index.d.ts +246 -247
  101. package/server/QueryStringUtil/index.d.ts +403 -414
  102. package/server/RedirectUtil/index.d.ts +62 -66
  103. package/server/RelatedValueBuilder/index.d.ts +40 -38
  104. package/server/Requester/index.d.ts +123 -123
  105. package/server/ResourceLocatorUtil/index.d.ts +434 -474
  106. package/server/RestApi/index.d.ts +156 -136
  107. package/server/RestAppInvokerFactory/index.d.ts +25 -23
  108. package/server/RoleAssignmentBuilder/index.d.ts +35 -33
  109. package/server/RoleMatcherBuilder/index.d.ts +35 -33
  110. package/server/RoleUtil/index.d.ts +35 -37
  111. package/server/ScriptUtil/index.d.ts +457 -494
  112. package/server/SearchFactory/index.d.ts +102 -117
  113. package/server/SearchUtil/index.d.ts +73 -71
  114. package/server/SearcherBuilder/index.d.ts +107 -114
  115. package/server/Session/index.d.ts +251 -1093
  116. package/server/Session/index.js +1 -20
  117. package/server/SimpleUserUtil/index.d.ts +26 -27
  118. package/server/SiteCookieUtil/index.d.ts +150 -173
  119. package/server/SortBuilder/index.d.ts +24 -22
  120. package/server/SourceSetMode/index.d.ts +12 -0
  121. package/server/SourceSetMode/index.js +12 -0
  122. package/server/SpellCheckBuilder/index.d.ts +27 -27
  123. package/server/StandardParserBuilder/index.d.ts +33 -31
  124. package/server/StructureUtil/index.d.ts +83 -81
  125. package/server/SubscriberUtil/index.d.ts +58 -65
  126. package/server/SubscriptionUtil/index.d.ts +121 -128
  127. package/server/SystemUserUtil/index.d.ts +146 -144
  128. package/server/TagUtil/index.d.ts +113 -118
  129. package/server/TemplateUtil/index.d.ts +113 -118
  130. package/server/TemporaryFileNodeBuilder/index.d.ts +29 -27
  131. package/server/TemporaryNodeBuilder/index.d.ts +136 -174
  132. package/server/TextModuleRendererBuilder/index.d.ts +18 -16
  133. package/server/TimestampUtil/index.d.ts +102 -116
  134. package/server/TranslationUtil/index.d.ts +96 -102
  135. package/server/TrashcanUtil/index.d.ts +112 -115
  136. package/server/UserDataUtil/index.d.ts +108 -109
  137. package/server/UserFactory/index.d.ts +49 -56
  138. package/server/UserFieldRenderer/index.d.ts +118 -126
  139. package/server/UserIdentityUtil/index.d.ts +36 -34
  140. package/server/UserUtil/index.d.ts +30 -28
  141. package/server/Utils/index.d.ts +702 -791
  142. package/server/VelocityRenderer/index.d.ts +94 -92
  143. package/server/VersionUtil/index.d.ts +24 -8
  144. package/server/WebContentUtil/index.d.ts +275 -282
  145. package/server/WebResourceFactory/index.d.ts +46 -51
  146. package/server/XSLTUtil/index.d.ts +33 -31
  147. package/server/XmlParserUtil/index.d.ts +47 -45
  148. package/server/appData/index.d.ts +8 -6
  149. package/server/appInfo/index.d.ts +6 -2
  150. package/server/appResource/index.d.ts +23 -21
  151. package/server/cache/index.d.ts +8 -6
  152. package/server/globalAppData/index.d.ts +8 -6
  153. package/server/headless/index.d.ts +28 -26
  154. package/server/hooks/index.d.ts +9 -9
  155. package/server/oauth2/index.d.ts +12 -10
  156. package/server/privileged/index.d.ts +24 -22
  157. package/server/storage/index.d.ts +22 -20
  158. package/types/javax/jcr/Binary/index.d.ts +0 -20
  159. package/types/javax/jcr/Binary/index.js +0 -1
  160. package/types/javax/jcr/ImportUUIDBehavior/index.d.ts +24 -0
  161. package/types/javax/jcr/Item/index.d.ts +1 -116
  162. package/types/javax/jcr/Item/index.js +0 -6
  163. package/types/javax/jcr/NamespaceRegistry/index.d.ts +66 -42
  164. package/types/javax/jcr/NamespaceRegistry/index.js +0 -2
  165. package/types/javax/jcr/Node/index.d.ts +24 -1495
  166. package/types/javax/jcr/Node/index.js +1 -34
  167. package/types/javax/jcr/NodeIterator/index.d.ts +1 -1
  168. package/types/javax/jcr/Property/index.d.ts +487 -489
  169. package/types/javax/jcr/Property/index.js +0 -5
  170. package/types/javax/jcr/PropertyIterator/index.d.ts +1 -1
  171. package/types/javax/jcr/RangeIterator/index.d.ts +1 -43
  172. package/types/javax/jcr/RangeIterator/index.js +1 -5
  173. package/types/javax/jcr/Repository/index.d.ts +460 -260
  174. package/types/javax/jcr/Repository/index.js +0 -4
  175. package/types/javax/jcr/Value/index.d.ts +0 -29
  176. package/types/javax/jcr/Value/index.js +0 -2
  177. package/types/javax/jcr/ValueFactory/index.d.ts +0 -70
  178. package/types/javax/jcr/ValueFactory/index.js +1 -2
  179. package/types/javax/jcr/Workspace/index.d.ts +93 -569
  180. package/types/javax/jcr/Workspace/index.js +1 -12
  181. package/types/javax/jcr/nodetype/ItemDefinition/index.d.ts +0 -103
  182. package/types/javax/jcr/nodetype/ItemDefinition/index.js +0 -5
  183. package/types/javax/jcr/nodetype/NodeDefinition/index.d.ts +1 -1
  184. package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +1 -1
  185. package/types/javax/jcr/nodetype/NodeType/index.d.ts +255 -264
  186. package/types/javax/jcr/nodetype/NodeType/index.js +1 -12
  187. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +0 -104
  188. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.js +1 -7
  189. package/types/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +1 -1
  190. package/types/javax/jcr/nodetype/NodeTypeManager/index.d.ts +0 -123
  191. package/types/javax/jcr/nodetype/NodeTypeManager/index.js +1 -8
  192. package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +1 -1
  193. package/types/javax/jcr/nodetype/PropertyDefinition/index.d.ts +1 -270
  194. package/types/javax/jcr/nodetype/PropertyDefinition/index.js +1 -7
  195. package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +1 -1
  196. package/types/javax/jcr/observation/Event/index.d.ts +82 -41
  197. package/types/javax/jcr/observation/EventIterator/index.d.ts +1 -1
  198. package/types/javax/jcr/observation/EventJournal/index.d.ts +1 -1
  199. package/types/javax/jcr/observation/EventListenerIterator/index.d.ts +1 -1
  200. package/types/javax/jcr/query/Query/index.d.ts +29 -8
  201. package/types/javax/jcr/query/RowIterator/index.d.ts +1 -1
  202. package/types/javax/jcr/query/qom/And/index.d.ts +1 -1
  203. package/types/javax/jcr/query/qom/BindVariableValue/index.d.ts +1 -1
  204. package/types/javax/jcr/query/qom/ChildNode/index.d.ts +1 -1
  205. package/types/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +1 -1
  206. package/types/javax/jcr/query/qom/Comparison/index.d.ts +1 -1
  207. package/types/javax/jcr/query/qom/DescendantNode/index.d.ts +1 -1
  208. package/types/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +1 -1
  209. package/types/javax/jcr/query/qom/DynamicOperand/index.d.ts +1 -1
  210. package/types/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +1 -1
  211. package/types/javax/jcr/query/qom/FullTextSearch/index.d.ts +1 -1
  212. package/types/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +1 -1
  213. package/types/javax/jcr/query/qom/Join/index.d.ts +1 -1
  214. package/types/javax/jcr/query/qom/Length/index.d.ts +1 -1
  215. package/types/javax/jcr/query/qom/Literal/index.d.ts +1 -1
  216. package/types/javax/jcr/query/qom/LowerCase/index.d.ts +1 -1
  217. package/types/javax/jcr/query/qom/NodeLocalName/index.d.ts +1 -1
  218. package/types/javax/jcr/query/qom/NodeName/index.d.ts +1 -1
  219. package/types/javax/jcr/query/qom/Not/index.d.ts +1 -1
  220. package/types/javax/jcr/query/qom/Or/index.d.ts +1 -1
  221. package/types/javax/jcr/query/qom/PropertyExistence/index.d.ts +1 -1
  222. package/types/javax/jcr/query/qom/PropertyValue/index.d.ts +1 -1
  223. package/types/javax/jcr/query/qom/QueryObjectModel/index.d.ts +1 -1
  224. package/types/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +73 -1
  225. package/types/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +1 -1
  226. package/types/javax/jcr/query/qom/SameNode/index.d.ts +1 -1
  227. package/types/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +1 -1
  228. package/types/javax/jcr/query/qom/Selector/index.d.ts +1 -1
  229. package/types/javax/jcr/query/qom/StaticOperand/index.d.ts +1 -1
  230. package/types/javax/jcr/query/qom/UpperCase/index.d.ts +1 -1
  231. package/types/javax/jcr/security/AccessControlList/index.d.ts +1 -1
  232. package/types/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +1 -1
  233. package/types/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +1 -1
  234. package/types/javax/jcr/security/Privilege/index.d.ts +127 -43
  235. package/types/javax/jcr/version/Version/index.d.ts +1 -1
  236. package/types/javax/jcr/version/VersionHistory/index.d.ts +1 -1
  237. package/types/javax/jcr/version/VersionIterator/index.d.ts +1 -1
  238. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.d.ts +9 -0
  239. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.js +11 -0
  240. package/types/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +9 -5
  241. package/types/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +1 -1
  242. package/types/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +1 -1
  243. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.d.ts +49 -0
  244. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.js +12 -0
  245. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.d.ts +83 -0
  246. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.js +21 -0
  247. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.d.ts +29 -0
  248. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.js +12 -0
  249. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.d.ts +29 -0
  250. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.js +12 -0
  251. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.d.ts +65 -0
  252. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.js +18 -0
  253. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.d.ts +23 -0
  254. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.js +11 -0
  255. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.d.ts +17 -0
  256. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.js +10 -0
  257. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.d.ts +1241 -0
  258. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.js +189 -0
  259. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.d.ts +29 -0
  260. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.js +12 -0
  261. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.d.ts +89 -0
  262. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.js +22 -0
  263. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.d.ts +25 -0
  264. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.js +11 -0
  265. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.d.ts +17 -0
  266. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.js +10 -0
  267. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.d.ts +17 -0
  268. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.js +10 -0
  269. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.d.ts +23 -0
  270. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.js +11 -0
  271. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.d.ts +35 -0
  272. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.js +13 -0
  273. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.d.ts +23 -0
  274. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.js +11 -0
  275. package/types/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +2 -2
  276. package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +22 -2
  277. package/types/senselogic/sitevision/api/search/SearchHit/index.d.ts +16 -2
  278. package/types/senselogic/sitevision/api/search/SearchResult/index.d.ts +28 -6
  279. package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +31 -1
  280. package/types/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +1 -1
@@ -1,383 +1,3 @@
1
- /**
2
- * Gets an immutable list of all available Locales (installed Java Locales and custom ones added by Sitevision).
3
- *
4
- * <p>
5
- * <strong>Note!</strong> The returned List is <em>immutable/unmodifiable</em>, i.e. you must create a copy if
6
- * you want to modify it (e.g. sort).
7
- * </p>
8
- * <p>
9
- * Below is an example of how to display some info about all locales via server-side Javascript:
10
- * </p>
11
- * <pre><code> (function() {
12
- * var localeUtil = require('LocaleUtil'),
13
- * locales = localeUtil.getAvailableLocales(),
14
- * count = locales.size(),
15
- * currentLocale = require('PortletContextUtil').getCurrentLocale(),
16
- * locale, i;
17
- *
18
- * out.println('&lt;table&gt;');
19
- * out.println('&lt;tr&gt;');
20
- * out.println(' &lt;th&gt;Language&lt;/th&gt;');
21
- * out.println(' &lt;th&gt;Country&lt;/th&gt;');
22
- * out.println(' &lt;th&gt;Language Tag&lt;/th&gt;');
23
- * out.println(' &lt;th&gt;Native language name&lt;/th&gt;');
24
- * out.println(' &lt;th&gt;Localized language name&lt;/th&gt;');
25
- * out.println(' &lt;th&gt;Directionality&lt;/th&gt;');
26
- * out.println('&lt;/tr&gt;');
27
- * for (i = 0; i &lt; count; i++) {
28
- * locale = locales.get(i);
29
- * out.println('&lt;tr&gt;');
30
- * out.println(' &lt;td&gt;' + localeUtil.getNormalizedLanguage(locale) + '&lt;/td&gt;');
31
- * out.println(' &lt;td&gt;' + locale.getCountry() + '&lt;/td&gt;');
32
- * out.println(' &lt;td&gt;' + localeUtil.getLanguageTag(locale) + '&lt;/td&gt;');
33
- * out.println(' &lt;td&gt;' + localeUtil.getNativeLanguageName(locale) + '&lt;/td&gt;');
34
- * out.println(' &lt;td&gt;' + localeUtil.getLocalizedLanguageName(locale, currentLocale) + '&lt;/td&gt;');
35
- * out.println(' &lt;td&gt;' + (localeUtil.isRTL(locale) ? 'RTL' : 'LTR') + '&lt;/td&gt;');
36
- * out.println('&lt;/tr&gt;');
37
- * }
38
- * out.println('&lt;/table&gt;');
39
- * }());</code></pre>
40
- * @return a immutable/unmodifiable list of all available Locales (i.e. all Locales installed by Java and all custom Locales added by Sitevision)
41
- * @since Sitevision 4.1
42
- */
43
- export function getAvailableLocales(): unknown;
44
-
45
- /**
46
- * Gets the native language name for a specified Locale.
47
- *
48
- * <p>
49
- * Some examples:
50
- * </p>
51
- * <ul>
52
- * <li>A <em>Swedish</em> Locale will return <em>Svenska</em></li>
53
- * <li>A <em>German</em> Locale will return <em>Deutsch</em></li>
54
- * <li>A <em>Northern Sami</em> Locale will return <em>Davvisámegiella</em></li>
55
- * </ul>
56
- * @param aLocale the locale
57
- * @return the native language name for <code>aLocale</code>, or <code>null</code> if <code>aLocale</code> is <code>null</code>
58
- */
59
- export function getNativeLanguageName(aLocale: unknown): string;
60
-
61
- /**
62
- * Gets the localized language name for a specified Locale.
63
- *
64
- * <p>
65
- * Some examples:
66
- * </p>
67
- * <ul>
68
- * <li>A <em>Swedish</em> <code>aLocale</code> and an <em>English</em> <code>aDisplayLocale</code> will return <em>Swedish</em></li>
69
- * <li>An <em>English</em> <code>aLocale</code> and a <em>Swedish</em> <code>aDisplayLocale</code> will return <em>Engelska</em></li>
70
- * <li>A <em>German</em> <code>aLocale</code> and a <em>Swedish</em> <code>aDisplayLocale</code> will return <em>Tyska</em></li>
71
- * <li>A <em>German</em> <code>aLocale</code> and an <em>English</em> <code>aDisplayLocale</code> will return <em>German</em></li>
72
- * </ul>
73
- * @param aLocale the locale to get the language name for
74
- * @param aDisplayLocale the locale that should be used when displaying the language name of <code>aLocale</code>
75
- * @return the localized language name for <code>aLocale</code>, or <code>null</code> if <code>aLocale</code> is <code>null</code>
76
- */
77
- export function getLocalizedLanguageName(
78
- aLocale: unknown,
79
- aDisplayLocale: unknown
80
- ): string;
81
-
82
- /**
83
- * Gets the native language name for a Locale that is resolved via a specified locale string.
84
- *
85
- * <p>
86
- * This method can be seen as a convenience method that combines the {@link #getLocaleByString(String)} method and the
87
- * {@link #getNativeLanguageName(java.util.Locale)} method to resolve a <code>Locale</code> and get the native language name.
88
- * But this is not strictly true. This method will handle all all well-formed locale strings that starts with a valid
89
- * language code used by a supported locale <em>(even though the "full" locale string might actually refer to a non-supported locale)</em>.
90
- * </p>
91
- * <p>
92
- * Some examples of this forgiving/lenient behaviour:
93
- * </p>
94
- * <ul>
95
- * <li>
96
- * <code>"rmy-RO"</code> matches a supported locale (Romani in Romania) and will return
97
- * the native name for the "rmy" language.
98
- * </li>
99
- * <li>
100
- * <code>"rmy_RO"</code> matches a supported locale (Romani in Romania) and will return
101
- * the native name for the "rmy" language.
102
- * </li>
103
- * <li>
104
- * <code>"rmy"</code> does NOT match the supported locale <code>"rmy-RO"/"rmy_RO"</code> but will still return
105
- * the native name for the "rmy" language.
106
- * </li>
107
- * <li>
108
- * <code>"rmy-SE"</code> does NOT match the supported locale <code>"rmy-RO"</code> but will still return
109
- * the native name for the "rmy" language.
110
- * </li>
111
- * <li>
112
- * <code>"rmy_SE"</code> does NOT match the supported locale <code>"rmy_RO"</code> but will still return
113
- * the native name for the "rmy" language.
114
- * </li>
115
- * </ul>
116
- * @param aLocaleString a language tag ("en-US") or string that contains language only ("en") or language and country ("en_US"), typically what you will get as result of <code>Locale.toString()</code>
117
- * @return the native language name for the <code>aLocale</code> that matches <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
118
- */
119
- export function getNativeLanguageNameByString(aLocaleString: string): string;
120
-
121
- /**
122
- * Gets the localized language name for a Locale that is resolved via a specified locale string.
123
- *
124
- * <p>
125
- * This is a convenience method that combines the {@link #getLocaleByString(String)} method and the
126
- * {@link #getLocalizedLanguageName(java.util.Locale, java.util.Locale)}
127
- * method to resolve a <code>Locale</code> and get the localized language name.
128
- * </p>
129
- * @param aLocaleString a string that contains language ("en") or language and country ("en_US"), typically what you will get as result of <code>Locale.toString()</code>
130
- * @param aDisplayLocale the locale that should be used when displaying the language name of the <code>Locale</code> resolved by <code>aLocaleString</code>
131
- * @return the localized language name for the <code>aLocale</code> that matches <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
132
- */
133
- export function getLocalizedLanguageNameByString(
134
- aLocaleString: string,
135
- aDisplayLocale: unknown
136
- ): string;
137
-
138
- /**
139
- * Returns the Locale for a language tag or a String that contains language or language + country ("en-US" or "en" or "en_US").
140
- *
141
- * <p>
142
- * A <code>toString()</code> on a english american locale returns the String <code>"en_US"</code>, but to create a locale
143
- * from that string you can NOT just create it by doing: <code>new Locale("en_US")</code>. You must split language (en)
144
- * and country (US) since the proper way of creating the Locale is: <code>new Locale("en", "US")</code>.
145
- * </p>
146
- *
147
- * <p>
148
- * Some examples of accepted locale strings:
149
- * </p>
150
- * <ul>
151
- * <li><em>Swedish</em> language tag: "sv-SE" and locale strings: "sv", "sv_SE"</li>
152
- * <li><em>German</em> language tag: "de-DE" and locale strings: "de", "de_DE"</li>
153
- * <li><em>Northern Sami</em> language tag: "se-SE" and locale string: "se_SE"</li>
154
- * </ul>
155
- *
156
- * <p>
157
- * <em>Note! This method only handles supported Locale's, i.e. Locales available via {@link #getAvailableLocales()}.</em>
158
- * </p>
159
- * @param aLocaleString a language tag or the toString() value of a Locale (i.e. a String with a lowercased language - or a lowercased language and uppercased country, separated with underscore).
160
- * @return a Locale matching <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
161
- */
162
- export function getLocaleByString(aLocaleString: string): unknown;
163
-
164
- /**
165
- * Returns the IETF BCP 47 language tag value for a Locale.
166
- *
167
- * <p>
168
- * Language tags are used to indicate the language of texts or other items in HTML and XML documents. The language tag
169
- * syntax is defined by the IETF <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</a>
170
- * and exemplified by W3C internationalization in
171
- * <a href="http://www.w3.org/International/articles/language-tags/">Language tags in HTML and XML</a>.
172
- * </p>
173
- *
174
- * <p>
175
- * This method supports both the Java default locales and the custom-defined ones in Sitevision (such as Northern Sami).
176
- * It produces a well-formatted BCP 47 value for a specified Locale but the language and region are not verified against the
177
- * <a href="http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">IANA language subtag registry</a>.
178
- * </p>
179
- * <p>
180
- * Some output examples:
181
- * </p>
182
- * <ul>
183
- * <li><em>Swedish</em> locale (language "sv", country "SE"): "sv-SE"</li>
184
- * <li><em>American english</em> locale (language "en", country "US"): "en-US"</li>
185
- * <li><em>Canadian french</em> locale (language "fr", country "CA"): "fr-CA"</li>
186
- * </ul>
187
- * @param aLocale a locale
188
- * @return the <code>aLocale</code> formatted according to BCP 47, or <code>null</code> if <code>aLocale</code> is <code>null</code>
189
- */
190
- export function getLanguageTag(aLocale: unknown): string;
191
-
192
- /**
193
- * Returns the normalized language for a specified Locale.
194
- *
195
- * <p>
196
- * Java uses old ISO language codes for for language codes that have changed. For instance: the legacy ISO language code for <em>Yiddish</em>
197
- * is <em>"ji"</em>, but that was changed to <em>"yi"</em> 1989. This method compensates for Javas legacy considerations and returns the
198
- * new ISO language codes instead.
199
- * </p>
200
- * @param aLocale a locale
201
- * @return the normalized language for the locale, or null if the locale is null
202
- * @since Sitevision 4.5.1
203
- */
204
- export function getNormalizedLanguage(aLocale: unknown): string;
205
-
206
- /**
207
- * Checks if a locale has writing direction Right-To-Left (RTL).
208
- *
209
- * <p>
210
- * Most languages have a clear writing direction, typically Left-To-Right (LTR). Though, some languages has mixed writing directions
211
- * (e.g. text is RTL but numbers are LTR) and some languages is written with different symbols (e.g. Latin, Arabic) in different regions.
212
- * This method will return true for such complex/mixed languages if the official writing direction is RTL or if RTL is used by the majority
213
- * of the native language writers.
214
- * </p>
215
- * <p>
216
- * This method supports the Java default locales and the custom-defined ones in Sitevision (such as Northern Sami).
217
- * It also supports locales that aren't officially supported by Sitevision (i.e. not present in {@link #getAvailableLocales()}).
218
- * The direction of the first char in the locales native name (as of {@link #getNativeLanguageName(Locale)})
219
- * is used to determine if the locale is LTR or RTL for such (unofficial) locales.
220
- * </p>
221
- * @param aLocale a locale
222
- * @return true if aLocale has Right-To-Left (RTL) writing direction, false otherwise (i.e. false indicates LTR)
223
- * @since Sitevision 4.3
224
- */
225
- export function isRTL(aLocale: unknown): boolean;
226
-
227
- /**
228
- * <p>
229
- * Gets a Locale with language and country for a (typically language-only) Locale.
230
- * </p>
231
- *
232
- * <table>
233
- * <caption>Replacement of language-only locales</caption>
234
- * <tr>
235
- * <th scope="col">Locale/language</th>
236
- * <th scope="col">Replacement</th>
237
- * </tr>
238
- * <tr>
239
- * <td>Swedish (sv)</td>
240
- * <td>Sweden (sv-SE)</td>
241
- * </tr>
242
- * <tr>
243
- * <td>Norwegian (no)</td>
244
- * <td>Norway (no-NO)</td>
245
- * </tr>
246
- * <tr>
247
- * <td>Danish (da)</td>
248
- * <td>Denmark (da-DK)</td>
249
- * </tr>
250
- * <tr>
251
- * <td>Finnish (fi)</td>
252
- * <td>Finland (fi-FI)</td>
253
- * </tr>
254
- * <tr>
255
- * <td>Icelandic (is)</td>
256
- * <td>Iceland (is-IS)</td>
257
- * </tr>
258
- * <tr>
259
- * <td>Belarusian (be)</td>
260
- * <td>Belarus (be-BY)</td>
261
- * </tr>
262
- * <tr>
263
- * <td>Bulgarian (bg)</td>
264
- * <td>Bulgaria (bg-BG)</td>
265
- * </tr>
266
- * <tr>
267
- * <td>Catalan (ca)</td>
268
- * <td>Spain (ca-ES)</td>
269
- * </tr>
270
- * <tr>
271
- * <td>Czech (cs)</td>
272
- * <td>Czech Republic (cs-CZ)</td>
273
- * </tr>
274
- * <tr>
275
- * <td>Estonian (et)</td>
276
- * <td>Estonia (et-EE)</td>
277
- * </tr>
278
- * <tr>
279
- * <td>Irish (ga)</td>
280
- * <td>Ireland (ga-IE)</td>
281
- * </tr>
282
- * <tr>
283
- * <td>Hebrew (he) and (iw)</td>
284
- * <td>Israel (he-IL)</td>
285
- * </tr>
286
- * <tr>
287
- * <td>Hindi (hi)</td>
288
- * <td>India (hi-IN)</td>
289
- * </tr>
290
- * <tr>
291
- * <td>Croatian (hr)</td>
292
- * <td>Croatia (hr-HR)</td>
293
- * </tr>
294
- * <tr>
295
- * <td>Indonesian (id) and (in)</td>
296
- * <td>Indonesia (id-ID)</td>
297
- * </tr>
298
- * <tr>
299
- * <td>Italian (it)</td>
300
- * <td>Italy (it-IT)</td>
301
- * </tr>
302
- * <tr>
303
- * <td>Japanese (ja)</td>
304
- * <td>Japan (ja-JP)</td>
305
- * </tr>
306
- * <tr>
307
- * <td>Lithuanian (lt)</td>
308
- * <td>Lithuania (lt-LT)</td>
309
- * </tr>
310
- * <tr>
311
- * <td>Latvian (lv)</td>
312
- * <td>Latvia (lv-LV)</td>
313
- * </tr>
314
- * <tr>
315
- * <td>Malay (ms)</td>
316
- * <td>Malaysia (ms-MY)</td>
317
- * </tr>
318
- * <tr>
319
- * <td>Maltese (mt)</td>
320
- * <td>Malta (mt-MT)</td>
321
- * </tr>
322
- * <tr>
323
- * <td>Polish (pl)</td>
324
- * <td>Poland (pl-PL)</td>
325
- * </tr>
326
- * <tr>
327
- * <td>Romanian (ro)</td>
328
- * <td>Romania (ro-RO)</td>
329
- * </tr>
330
- * <tr>
331
- * <td>Slovak (sk)</td>
332
- * <td>Slovakia (sk-SK)</td>
333
- * </tr>
334
- * <tr>
335
- * <td>Slovenian (sl)</td>
336
- * <td>Slovenia (sl-SI)</td>
337
- * </tr>
338
- * <tr>
339
- * <td>Albanian (sq)</td>
340
- * <td>Albania (sq-AL)</td>
341
- * </tr>
342
- * <tr>
343
- * <td>Thai (th)</td>
344
- * <td>Thailand (th-TH)</td>
345
- * </tr>
346
- * <tr>
347
- * <td>Turkish (tr)</td>
348
- * <td>Turkey (tr-TR)</td>
349
- * </tr>
350
- * <tr>
351
- * <td>Ukranian (uk)</td>
352
- * <td>Ukraine (uk-UA)</td>
353
- * </tr>
354
- * <tr>
355
- * <td>Vietnamese (vi)</td>
356
- * <td>Vietnam (vi-VN)</td>
357
- * </tr>
358
- * </table>
359
- * <p>
360
- * <strong>Important language-only note!</strong> There are many language-only locales that can not be resolved
361
- * <em>(i.e. the language is officially spoken in multiple countries)</em>.
362
- * This method will return <code>null</code> for such locales. For example:
363
- * </p>
364
- * <ul>
365
- * <li>English (en)</li>
366
- * <li>French (fr)</li>
367
- * <li>German (de)</li>
368
- * <li>Dutch (nl)</li>
369
- * <li>Spanish (es)</li>
370
- * <li>Russian (ru)</li>
371
- * <li>Arabic (ar)</li>
372
- * <li>Farsi (fa)</li>
373
- * <li>...</li>
374
- * </ul>
375
- * @param aLocale a Locale, typically a language-only Locale
376
- * @return the corresponding locale with country, or null if no corresponding locale could be found
377
- * @since Sitevision 6.1
378
- */
379
- export function resolveCountryLocale(aLocale: unknown): unknown;
380
-
381
1
  /**
382
2
  * Locale utility interface.
383
3
  *
@@ -408,19 +28,387 @@ export function resolveCountryLocale(aLocale: unknown): unknown;
408
28
  * @see senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()
409
29
  * @see senselogic.sitevision.api.node.NodeResolverUtil#getLocaleResolver()
410
30
  */
411
- declare namespace localeUtil {
412
- export {
413
- getAvailableLocales,
414
- getNativeLanguageName,
415
- getLocalizedLanguageName,
416
- getNativeLanguageNameByString,
417
- getLocalizedLanguageNameByString,
418
- getLocaleByString,
419
- getLanguageTag,
420
- getNormalizedLanguage,
421
- isRTL,
422
- resolveCountryLocale,
423
- };
31
+ export interface LocaleUtil {
32
+ /**
33
+ * Gets an immutable list of all available Locales (installed Java Locales and custom ones added by Sitevision).
34
+ *
35
+ * <p>
36
+ * <strong>Note!</strong> The returned List is <em>immutable/unmodifiable</em>, i.e. you must create a copy if
37
+ * you want to modify it (e.g. sort).
38
+ * </p>
39
+ * <p>
40
+ * Below is an example of how to display some info about all locales via server-side Javascript:
41
+ * </p>
42
+ * <pre><code> (function() {
43
+ * var localeUtil = require('LocaleUtil'),
44
+ * locales = localeUtil.getAvailableLocales(),
45
+ * count = locales.size(),
46
+ * currentLocale = require('PortletContextUtil').getCurrentLocale(),
47
+ * locale, i;
48
+ *
49
+ * out.println('&lt;table&gt;');
50
+ * out.println('&lt;tr&gt;');
51
+ * out.println(' &lt;th&gt;Language&lt;/th&gt;');
52
+ * out.println(' &lt;th&gt;Country&lt;/th&gt;');
53
+ * out.println(' &lt;th&gt;Language Tag&lt;/th&gt;');
54
+ * out.println(' &lt;th&gt;Native language name&lt;/th&gt;');
55
+ * out.println(' &lt;th&gt;Localized language name&lt;/th&gt;');
56
+ * out.println(' &lt;th&gt;Directionality&lt;/th&gt;');
57
+ * out.println('&lt;/tr&gt;');
58
+ * for (i = 0; i &lt; count; i++) {
59
+ * locale = locales.get(i);
60
+ * out.println('&lt;tr&gt;');
61
+ * out.println(' &lt;td&gt;' + localeUtil.getNormalizedLanguage(locale) + '&lt;/td&gt;');
62
+ * out.println(' &lt;td&gt;' + locale.getCountry() + '&lt;/td&gt;');
63
+ * out.println(' &lt;td&gt;' + localeUtil.getLanguageTag(locale) + '&lt;/td&gt;');
64
+ * out.println(' &lt;td&gt;' + localeUtil.getNativeLanguageName(locale) + '&lt;/td&gt;');
65
+ * out.println(' &lt;td&gt;' + localeUtil.getLocalizedLanguageName(locale, currentLocale) + '&lt;/td&gt;');
66
+ * out.println(' &lt;td&gt;' + (localeUtil.isRTL(locale) ? 'RTL' : 'LTR') + '&lt;/td&gt;');
67
+ * out.println('&lt;/tr&gt;');
68
+ * }
69
+ * out.println('&lt;/table&gt;');
70
+ * }());</code></pre>
71
+ * @return a immutable/unmodifiable list of all available Locales (i.e. all Locales installed by Java and all custom Locales added by Sitevision)
72
+ * @since Sitevision 4.1
73
+ */
74
+ getAvailableLocales(): unknown;
75
+
76
+ /**
77
+ * Gets the native language name for a specified Locale.
78
+ *
79
+ * <p>
80
+ * Some examples:
81
+ * </p>
82
+ * <ul>
83
+ * <li>A <em>Swedish</em> Locale will return <em>Svenska</em></li>
84
+ * <li>A <em>German</em> Locale will return <em>Deutsch</em></li>
85
+ * <li>A <em>Northern Sami</em> Locale will return <em>Davvisámegiella</em></li>
86
+ * </ul>
87
+ * @param aLocale the locale
88
+ * @return the native language name for <code>aLocale</code>, or <code>null</code> if <code>aLocale</code> is <code>null</code>
89
+ */
90
+ getNativeLanguageName(aLocale: unknown): string;
91
+
92
+ /**
93
+ * Gets the localized language name for a specified Locale.
94
+ *
95
+ * <p>
96
+ * Some examples:
97
+ * </p>
98
+ * <ul>
99
+ * <li>A <em>Swedish</em> <code>aLocale</code> and an <em>English</em> <code>aDisplayLocale</code> will return <em>Swedish</em></li>
100
+ * <li>An <em>English</em> <code>aLocale</code> and a <em>Swedish</em> <code>aDisplayLocale</code> will return <em>Engelska</em></li>
101
+ * <li>A <em>German</em> <code>aLocale</code> and a <em>Swedish</em> <code>aDisplayLocale</code> will return <em>Tyska</em></li>
102
+ * <li>A <em>German</em> <code>aLocale</code> and an <em>English</em> <code>aDisplayLocale</code> will return <em>German</em></li>
103
+ * </ul>
104
+ * @param aLocale the locale to get the language name for
105
+ * @param aDisplayLocale the locale that should be used when displaying the language name of <code>aLocale</code>
106
+ * @return the localized language name for <code>aLocale</code>, or <code>null</code> if <code>aLocale</code> is <code>null</code>
107
+ */
108
+ getLocalizedLanguageName(aLocale: unknown, aDisplayLocale: unknown): string;
109
+
110
+ /**
111
+ * Gets the native language name for a Locale that is resolved via a specified locale string.
112
+ *
113
+ * <p>
114
+ * This method can be seen as a convenience method that combines the {@link #getLocaleByString(String)} method and the
115
+ * {@link #getNativeLanguageName(java.util.Locale)} method to resolve a <code>Locale</code> and get the native language name.
116
+ * But this is not strictly true. This method will handle all all well-formed locale strings that starts with a valid
117
+ * language code used by a supported locale <em>(even though the "full" locale string might actually refer to a non-supported locale)</em>.
118
+ * </p>
119
+ * <p>
120
+ * Some examples of this forgiving/lenient behaviour:
121
+ * </p>
122
+ * <ul>
123
+ * <li>
124
+ * <code>"rmy-RO"</code> matches a supported locale (Romani in Romania) and will return
125
+ * the native name for the "rmy" language.
126
+ * </li>
127
+ * <li>
128
+ * <code>"rmy_RO"</code> matches a supported locale (Romani in Romania) and will return
129
+ * the native name for the "rmy" language.
130
+ * </li>
131
+ * <li>
132
+ * <code>"rmy"</code> does NOT match the supported locale <code>"rmy-RO"/"rmy_RO"</code> but will still return
133
+ * the native name for the "rmy" language.
134
+ * </li>
135
+ * <li>
136
+ * <code>"rmy-SE"</code> does NOT match the supported locale <code>"rmy-RO"</code> but will still return
137
+ * the native name for the "rmy" language.
138
+ * </li>
139
+ * <li>
140
+ * <code>"rmy_SE"</code> does NOT match the supported locale <code>"rmy_RO"</code> but will still return
141
+ * the native name for the "rmy" language.
142
+ * </li>
143
+ * </ul>
144
+ * @param aLocaleString a language tag ("en-US") or string that contains language only ("en") or language and country ("en_US"), typically what you will get as result of <code>Locale.toString()</code>
145
+ * @return the native language name for the <code>aLocale</code> that matches <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
146
+ */
147
+ getNativeLanguageNameByString(aLocaleString: string): string;
148
+
149
+ /**
150
+ * Gets the localized language name for a Locale that is resolved via a specified locale string.
151
+ *
152
+ * <p>
153
+ * This is a convenience method that combines the {@link #getLocaleByString(String)} method and the
154
+ * {@link #getLocalizedLanguageName(java.util.Locale, java.util.Locale)}
155
+ * method to resolve a <code>Locale</code> and get the localized language name.
156
+ * </p>
157
+ * @param aLocaleString a string that contains language ("en") or language and country ("en_US"), typically what you will get as result of <code>Locale.toString()</code>
158
+ * @param aDisplayLocale the locale that should be used when displaying the language name of the <code>Locale</code> resolved by <code>aLocaleString</code>
159
+ * @return the localized language name for the <code>aLocale</code> that matches <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
160
+ */
161
+ getLocalizedLanguageNameByString(
162
+ aLocaleString: string,
163
+ aDisplayLocale: unknown
164
+ ): string;
165
+
166
+ /**
167
+ * Returns the Locale for a language tag or a String that contains language or language + country ("en-US" or "en" or "en_US").
168
+ *
169
+ * <p>
170
+ * A <code>toString()</code> on a english american locale returns the String <code>"en_US"</code>, but to create a locale
171
+ * from that string you can NOT just create it by doing: <code>new Locale("en_US")</code>. You must split language (en)
172
+ * and country (US) since the proper way of creating the Locale is: <code>new Locale("en", "US")</code>.
173
+ * </p>
174
+ *
175
+ * <p>
176
+ * Some examples of accepted locale strings:
177
+ * </p>
178
+ * <ul>
179
+ * <li><em>Swedish</em> language tag: "sv-SE" and locale strings: "sv", "sv_SE"</li>
180
+ * <li><em>German</em> language tag: "de-DE" and locale strings: "de", "de_DE"</li>
181
+ * <li><em>Northern Sami</em> language tag: "se-SE" and locale string: "se_SE"</li>
182
+ * </ul>
183
+ *
184
+ * <p>
185
+ * <em>Note! This method only handles supported Locale's, i.e. Locales available via {@link #getAvailableLocales()}.</em>
186
+ * </p>
187
+ * @param aLocaleString a language tag or the toString() value of a Locale (i.e. a String with a lowercased language - or a lowercased language and uppercased country, separated with underscore).
188
+ * @return a Locale matching <code>aLocaleString</code>, or <code>null</code> if <code>aLocaleString</code> is <code>null</code>, whitespace only or doesn't match a supported Locale
189
+ */
190
+ getLocaleByString(aLocaleString: string): unknown;
191
+
192
+ /**
193
+ * Returns the IETF BCP 47 language tag value for a Locale.
194
+ *
195
+ * <p>
196
+ * Language tags are used to indicate the language of texts or other items in HTML and XML documents. The language tag
197
+ * syntax is defined by the IETF <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</a>
198
+ * and exemplified by W3C internationalization in
199
+ * <a href="http://www.w3.org/International/articles/language-tags/">Language tags in HTML and XML</a>.
200
+ * </p>
201
+ *
202
+ * <p>
203
+ * This method supports both the Java default locales and the custom-defined ones in Sitevision (such as Northern Sami).
204
+ * It produces a well-formatted BCP 47 value for a specified Locale but the language and region are not verified against the
205
+ * <a href="http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">IANA language subtag registry</a>.
206
+ * </p>
207
+ * <p>
208
+ * Some output examples:
209
+ * </p>
210
+ * <ul>
211
+ * <li><em>Swedish</em> locale (language "sv", country "SE"): "sv-SE"</li>
212
+ * <li><em>American english</em> locale (language "en", country "US"): "en-US"</li>
213
+ * <li><em>Canadian french</em> locale (language "fr", country "CA"): "fr-CA"</li>
214
+ * </ul>
215
+ * @param aLocale a locale
216
+ * @return the <code>aLocale</code> formatted according to BCP 47, or <code>null</code> if <code>aLocale</code> is <code>null</code>
217
+ */
218
+ getLanguageTag(aLocale: unknown): string;
219
+
220
+ /**
221
+ * Returns the normalized language for a specified Locale.
222
+ *
223
+ * <p>
224
+ * Java uses old ISO language codes for for language codes that have changed. For instance: the legacy ISO language code for <em>Yiddish</em>
225
+ * is <em>"ji"</em>, but that was changed to <em>"yi"</em> 1989. This method compensates for Javas legacy considerations and returns the
226
+ * new ISO language codes instead.
227
+ * </p>
228
+ * @param aLocale a locale
229
+ * @return the normalized language for the locale, or null if the locale is null
230
+ * @since Sitevision 4.5.1
231
+ */
232
+ getNormalizedLanguage(aLocale: unknown): string;
233
+
234
+ /**
235
+ * Checks if a locale has writing direction Right-To-Left (RTL).
236
+ *
237
+ * <p>
238
+ * Most languages have a clear writing direction, typically Left-To-Right (LTR). Though, some languages has mixed writing directions
239
+ * (e.g. text is RTL but numbers are LTR) and some languages is written with different symbols (e.g. Latin, Arabic) in different regions.
240
+ * This method will return true for such complex/mixed languages if the official writing direction is RTL or if RTL is used by the majority
241
+ * of the native language writers.
242
+ * </p>
243
+ * <p>
244
+ * This method supports the Java default locales and the custom-defined ones in Sitevision (such as Northern Sami).
245
+ * It also supports locales that aren't officially supported by Sitevision (i.e. not present in {@link #getAvailableLocales()}).
246
+ * The direction of the first char in the locales native name (as of {@link #getNativeLanguageName(Locale)})
247
+ * is used to determine if the locale is LTR or RTL for such (unofficial) locales.
248
+ * </p>
249
+ * @param aLocale a locale
250
+ * @return true if aLocale has Right-To-Left (RTL) writing direction, false otherwise (i.e. false indicates LTR)
251
+ * @since Sitevision 4.3
252
+ */
253
+ isRTL(aLocale: unknown): boolean;
254
+
255
+ /**
256
+ * <p>
257
+ * Gets a Locale with language and country for a (typically language-only) Locale.
258
+ * </p>
259
+ *
260
+ * <table>
261
+ * <caption>Replacement of language-only locales</caption>
262
+ * <tr>
263
+ * <th scope="col">Locale/language</th>
264
+ * <th scope="col">Replacement</th>
265
+ * </tr>
266
+ * <tr>
267
+ * <td>Swedish (sv)</td>
268
+ * <td>Sweden (sv-SE)</td>
269
+ * </tr>
270
+ * <tr>
271
+ * <td>Norwegian (no)</td>
272
+ * <td>Norway (no-NO)</td>
273
+ * </tr>
274
+ * <tr>
275
+ * <td>Danish (da)</td>
276
+ * <td>Denmark (da-DK)</td>
277
+ * </tr>
278
+ * <tr>
279
+ * <td>Finnish (fi)</td>
280
+ * <td>Finland (fi-FI)</td>
281
+ * </tr>
282
+ * <tr>
283
+ * <td>Icelandic (is)</td>
284
+ * <td>Iceland (is-IS)</td>
285
+ * </tr>
286
+ * <tr>
287
+ * <td>Belarusian (be)</td>
288
+ * <td>Belarus (be-BY)</td>
289
+ * </tr>
290
+ * <tr>
291
+ * <td>Bulgarian (bg)</td>
292
+ * <td>Bulgaria (bg-BG)</td>
293
+ * </tr>
294
+ * <tr>
295
+ * <td>Catalan (ca)</td>
296
+ * <td>Spain (ca-ES)</td>
297
+ * </tr>
298
+ * <tr>
299
+ * <td>Czech (cs)</td>
300
+ * <td>Czech Republic (cs-CZ)</td>
301
+ * </tr>
302
+ * <tr>
303
+ * <td>Estonian (et)</td>
304
+ * <td>Estonia (et-EE)</td>
305
+ * </tr>
306
+ * <tr>
307
+ * <td>Irish (ga)</td>
308
+ * <td>Ireland (ga-IE)</td>
309
+ * </tr>
310
+ * <tr>
311
+ * <td>Hebrew (he) and (iw)</td>
312
+ * <td>Israel (he-IL)</td>
313
+ * </tr>
314
+ * <tr>
315
+ * <td>Hindi (hi)</td>
316
+ * <td>India (hi-IN)</td>
317
+ * </tr>
318
+ * <tr>
319
+ * <td>Croatian (hr)</td>
320
+ * <td>Croatia (hr-HR)</td>
321
+ * </tr>
322
+ * <tr>
323
+ * <td>Indonesian (id) and (in)</td>
324
+ * <td>Indonesia (id-ID)</td>
325
+ * </tr>
326
+ * <tr>
327
+ * <td>Italian (it)</td>
328
+ * <td>Italy (it-IT)</td>
329
+ * </tr>
330
+ * <tr>
331
+ * <td>Japanese (ja)</td>
332
+ * <td>Japan (ja-JP)</td>
333
+ * </tr>
334
+ * <tr>
335
+ * <td>Lithuanian (lt)</td>
336
+ * <td>Lithuania (lt-LT)</td>
337
+ * </tr>
338
+ * <tr>
339
+ * <td>Latvian (lv)</td>
340
+ * <td>Latvia (lv-LV)</td>
341
+ * </tr>
342
+ * <tr>
343
+ * <td>Malay (ms)</td>
344
+ * <td>Malaysia (ms-MY)</td>
345
+ * </tr>
346
+ * <tr>
347
+ * <td>Maltese (mt)</td>
348
+ * <td>Malta (mt-MT)</td>
349
+ * </tr>
350
+ * <tr>
351
+ * <td>Polish (pl)</td>
352
+ * <td>Poland (pl-PL)</td>
353
+ * </tr>
354
+ * <tr>
355
+ * <td>Romanian (ro)</td>
356
+ * <td>Romania (ro-RO)</td>
357
+ * </tr>
358
+ * <tr>
359
+ * <td>Slovak (sk)</td>
360
+ * <td>Slovakia (sk-SK)</td>
361
+ * </tr>
362
+ * <tr>
363
+ * <td>Slovenian (sl)</td>
364
+ * <td>Slovenia (sl-SI)</td>
365
+ * </tr>
366
+ * <tr>
367
+ * <td>Albanian (sq)</td>
368
+ * <td>Albania (sq-AL)</td>
369
+ * </tr>
370
+ * <tr>
371
+ * <td>Thai (th)</td>
372
+ * <td>Thailand (th-TH)</td>
373
+ * </tr>
374
+ * <tr>
375
+ * <td>Turkish (tr)</td>
376
+ * <td>Turkey (tr-TR)</td>
377
+ * </tr>
378
+ * <tr>
379
+ * <td>Ukranian (uk)</td>
380
+ * <td>Ukraine (uk-UA)</td>
381
+ * </tr>
382
+ * <tr>
383
+ * <td>Vietnamese (vi)</td>
384
+ * <td>Vietnam (vi-VN)</td>
385
+ * </tr>
386
+ * </table>
387
+ * <p>
388
+ * <strong>Important language-only note!</strong> There are many language-only locales that can not be resolved
389
+ * <em>(i.e. the language is officially spoken in multiple countries)</em>.
390
+ * This method will return <code>null</code> for such locales. For example:
391
+ * </p>
392
+ * <ul>
393
+ * <li>English (en)</li>
394
+ * <li>French (fr)</li>
395
+ * <li>German (de)</li>
396
+ * <li>Dutch (nl)</li>
397
+ * <li>Spanish (es)</li>
398
+ * <li>Russian (ru)</li>
399
+ * <li>Arabic (ar)</li>
400
+ * <li>Farsi (fa)</li>
401
+ * <li>...</li>
402
+ * </ul>
403
+ * @param aLocale a Locale, typically a language-only Locale
404
+ * @return the corresponding locale with country, or null if no corresponding locale could be found
405
+ * @since Sitevision 6.1
406
+ */
407
+ resolveCountryLocale(aLocale: unknown): unknown;
424
408
  }
425
409
 
410
+ declare namespace LocaleUtil {}
411
+
412
+ declare var localeUtil: LocaleUtil;
413
+
426
414
  export default localeUtil;