-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.http.middleware.language.html
23 lines (23 loc) · 39.6 KB
/
amelinium.http.middleware.language.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.http.middleware.language documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Amelinium</span> <span class="project-version">1.0.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li><li class="depth-1 "><a href="20_hypermedia.html"><div class="inner"><span>Hypermedia-driven</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="amelinium.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amelinium</span></div></a></li><li class="depth-2 branch"><a href="amelinium.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-2"><a href="amelinium.api.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>api</span></div></a></li><li class="depth-3"><a href="amelinium.api.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4"><a href="amelinium.api.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3"><a href="amelinium.api.url.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>url</span></div></a></li><li class="depth-2 branch"><a href="amelinium.app.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>app</span></div></a></li><li class="depth-2"><a href="amelinium.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-4 branch"><a href="amelinium.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-4"><a href="amelinium.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-3 branch"><a href="amelinium.auth.pwd.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-3"><a href="amelinium.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-2"><a href="amelinium.common.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-3"><a href="amelinium.common.oplog.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oplog</span></div></a></li><li class="depth-4"><a href="amelinium.common.oplog.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.populators.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-3"><a href="amelinium.common.swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swagger</span></div></a></li><li class="depth-2 branch"><a href="amelinium.core.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="amelinium.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3"><a href="amelinium.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-2 branch"><a href="amelinium.errors.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-2"><a href="amelinium.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>client</span></div></div></li><li class="depth-4"><a href="amelinium.http.client.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-3"><a href="amelinium.http.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.content.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>content</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.debug.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>debug</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.format.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>format</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.headers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>headers</span></div></a></li><li class="depth-4 branch current"><a href="amelinium.http.middleware.language.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>language</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.lazy-req.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy-req</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.populators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.remote-ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>remote-ip</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-4"><a href="amelinium.http.middleware.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.router.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-3"><a href="amelinium.http.server.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.server.jetty.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>jetty</span></div></a></li><li class="depth-4"><a href="amelinium.http.server.undertow.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>undertow</span></div></a></li><li class="depth-2"><a href="amelinium.i18n.html"><div class="inner"><span class="tree" style="top: -672px;"><span class="top" style="height: 681px;"></span><span class="bottom"></span></span><span>i18n</span></div></a></li><li class="depth-3"><a href="amelinium.i18n.pluralizers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pluralizers</span></div></a></li><li class="depth-2 branch"><a href="amelinium.identity.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-2 branch"><a href="amelinium.locale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locale</span></div></a></li><li class="depth-2 branch"><a href="amelinium.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>model</span></div></div></li><li class="depth-3 branch"><a href="amelinium.model.confirmation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirmation</span></div></a></li><li class="depth-3"><a href="amelinium.model.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>proto</span></div></div></li><li class="depth-3 branch"><a href="amelinium.proto.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.proto.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.schemas.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>schemas</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></div></li><li class="depth-3"><a href="amelinium.server.ssl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ssl</span></div></a></li><li class="depth-2 branch"><a href="amelinium.system.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>system</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></div></li><li class="depth-3 branch"><a href="amelinium.types.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.types.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.utils.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="amelinium.web.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>web</span></div></a></li><li class="depth-3"><a href="amelinium.web.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4 branch"><a href="amelinium.web.controller.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-4"><a href="amelinium.web.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.js.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>js</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.taggers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taggers</span></div></a></li><li class="depth-3"><a href="amelinium.web.url.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>url</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-accept-picker"><div class="inner"><span>accept-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-body-phone-picker"><div class="inner"><span>body-phone-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-body-phone-picker-str"><div class="inner"><span>body-phone-picker-str</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-body-picker"><div class="inner"><span>body-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-config"><div class="inner"><span>config</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-default-fallback-language"><div class="inner"><span>default-fallback-language</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-default-lang-id"><div class="inner"><span>default-lang-id</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-default-lang-param"><div class="inner"><span>default-lang-param</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-default-picker"><div class="inner"><span>default-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-default-picker-chain"><div class="inner"><span>default-picker-chain</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-force"><div class="inner"><span>force</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-form-param-phone-picker"><div class="inner"><span>form-param-phone-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-form-param-phone-picker-str"><div class="inner"><span>form-param-phone-picker-str</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-form-params-picker"><div class="inner"><span>form-params-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-form-params-picker-str"><div class="inner"><span>form-params-picker-str</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-from-accept"><div class="inner"><span>from-accept</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-from-body"><div class="inner"><span>from-body</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-from-default"><div class="inner"><span>from-default</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-from-form-params"><div class="inner"><span>from-form-params</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-from-path"><div class="inner"><span>from-path</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-get-in-req"><div class="inner"><span>get-in-req</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-init-picker-chain"><div class="inner"><span>init-picker-chain</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-init-pickers"><div class="inner"><span>init-pickers</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-param"><div class="inner"><span>param</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-path-picker"><div class="inner"><span>path-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-pick"><div class="inner"><span>pick</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-pick-without-fallback"><div class="inner"><span>pick-without-fallback</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-pickers"><div class="inner"><span>pickers</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-prep-language"><div class="inner"><span>prep-language</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-prep-supported"><div class="inner"><span>prep-supported</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-process-picker"><div class="inner"><span>process-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-query-params-picker"><div class="inner"><span>query-params-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-query-params-picker-str"><div class="inner"><span>query-params-picker-str</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-re-lang"><div class="inner"><span>re-lang</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-req-picker"><div class="inner"><span>req-picker</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-supported"><div class="inner"><span>supported</span></div></a></li><li class="depth-1"><a href="amelinium.http.middleware.language.html#var-wrap-language"><div class="inner"><span>wrap-language</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">amelinium.http.middleware.language</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>amelinium service, language middleware.</p>
</div></div><div class="public anchor" id="var-accept-picker"><h3>accept-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L210">view source</a></div></div><div class="public anchor" id="var-body-phone-picker"><h3>body-phone-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L194">view source</a></div></div><div class="public anchor" id="var-body-phone-picker-str"><h3>body-phone-picker-str</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L202">view source</a></div></div><div class="public anchor" id="var-body-picker"><h3>body-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L190">view source</a></div></div><div class="public anchor" id="var-config"><h3>config</h3><div class="usage"><code>(config req)</code><code>(config req config)</code></div><div class="doc"><div class="markdown"><p>Returns language settings obtained from a request map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L54">view source</a></div></div><div class="public anchor" id="var-default-fallback-language"><h3>default-fallback-language</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L22">view source</a></div></div><div class="public anchor" id="var-default-lang-id"><h3>default-lang-id</h3><div class="usage"><code>(default-lang-id req)</code><code>(default-lang-id _ config)</code></div><div class="doc"><div class="markdown"><p>Returns an ID (a keyword) of a default language set in config (under the <code>:default</code> key) or a value of the <code>default-fallback-language</code> variable (<code>:en</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L28">view source</a></div></div><div class="public anchor" id="var-default-lang-param"><h3>default-lang-param</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L21">view source</a></div></div><div class="public anchor" id="var-default-picker"><h3>default-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L167">view source</a></div></div><div class="public anchor" id="var-default-picker-chain"><h3>default-picker-chain</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L287">view source</a></div></div><div class="public anchor" id="var-force"><h3>force</h3><div class="usage"><code>(force req language)</code></div><div class="doc"><div class="markdown"><p>Forces different language in a request map by setting <code>:language/id</code> and <code>:language/str</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L273">view source</a></div></div><div class="public anchor" id="var-form-param-phone-picker"><h3>form-param-phone-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L246">view source</a></div></div><div class="public anchor" id="var-form-param-phone-picker-str"><h3>form-param-phone-picker-str</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L238">view source</a></div></div><div class="public anchor" id="var-form-params-picker"><h3>form-params-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L231">view source</a></div></div><div class="public anchor" id="var-form-params-picker-str"><h3>form-params-picker-str</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L224">view source</a></div></div><div class="public anchor" id="var-from-accept"><h3>from-accept</h3><div class="usage"><code>(from-accept req)</code><code>(from-accept req config)</code><code>(from-accept req _ _ supp)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L162">view source</a></div></div><div class="public anchor" id="var-from-body"><h3>from-body</h3><div class="usage"><code>(from-body req)</code><code>(from-body req config)</code><code>(from-body req _ lang-param supp)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L157">view source</a></div></div><div class="public anchor" id="var-from-default"><h3>from-default</h3><div class="usage"><code>(from-default req)</code><code>(from-default req config)</code><code>(from-default _ _ default)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L118">view source</a></div></div><div class="public anchor" id="var-from-form-params"><h3>from-form-params</h3><div class="usage"><code>(from-form-params req)</code><code>(from-form-params req config)</code><code>(from-form-params req _ lang-param supp)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L152">view source</a></div></div><div class="public anchor" id="var-from-path"><h3>from-path</h3><div class="usage"><code>(from-path req)</code><code>(from-path req config)</code><code>(from-path req lang-param supp)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L262">view source</a></div></div><div class="public anchor" id="var-get-in-req"><h3>get-in-req</h3><div class="usage"><code>(get-in-req req supported k)</code><code>(get-in-req req supported k1 k2)</code><code>(get-in-req req supported k1 k2 k3)</code><code>(get-in-req req supported k1 k2 k3 & kpath)</code></div><div class="doc"><div class="markdown"><p>Reads a language from the given request map by getting a value specified by a sequence of keys, converting the result to a keyword and checking against a set of supported languages.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L123">view source</a></div></div><div class="public anchor" id="var-init-picker-chain"><h3>init-picker-chain</h3><div class="usage"><code>(init-picker-chain config pickers)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L338">view source</a></div></div><div class="public anchor" id="var-init-pickers"><h3>init-pickers</h3><div class="usage"><code>(init-pickers config)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L349">view source</a></div></div><div class="public anchor" id="var-param"><h3>param</h3><div class="usage"><code>(param req)</code><code>(param _ config)</code></div><div class="doc"><div class="markdown"><p>Returns a value associated with <code>:param</code> key in settings obtained from a request map or a config. If it does not exist or has falsy value, <code>default-lang-param</code> is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L37">view source</a></div></div><div class="public anchor" id="var-path-picker"><h3>path-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L254">view source</a></div></div><div class="public anchor" id="var-pick"><h3>pick</h3><div class="usage"><code>(pick req)</code><code>(pick req pickers)</code><code>(pick req picker-id)</code><code>(pick req pickers picker-id)</code></div><div class="doc"><div class="markdown"><p>Picks the right language using a chain of picking functions identified by a keyword. In its unary variant it obtains language picker chains configuration from a request map (under <code>:language/pickers</code> key) and looks for the picker chain identified by the <code>:default</code> key. When it’s not <code>nil</code>, it is used.</p>
<p>In its binary variant it takes a request map and pickers configuration given as a map OR a request map and an ID of a picker given as a keyword. When a map is given, the picker chain associated with the <code>:default</code> key will be used. When a picker ID is given the chain will be selected from picker chains obtained from the <code>req</code> under the key <code>:language/pickers</code>. Next, the picker chain will be run with a request map as its argument and the result will be then returned.</p>
<p>In its ternary variant the given <code>pickers</code> map will be used to look for a chain under the given <code>picker-id</code>. This chain will be run with a request map as its argument to get the language.</p>
<p>If the value returned by a language picker chain will be <code>nil</code> or <code>false</code> then the default language will be returned (if configured).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L81">view source</a></div></div><div class="public anchor" id="var-pick-without-fallback"><h3>pick-without-fallback</h3><div class="usage"><code>(pick-without-fallback req)</code><code>(pick-without-fallback req pickers-or-picker-id)</code><code>(pick-without-fallback req pickers picker-id)</code></div><div class="doc"><div class="markdown"><p>The same as <code>pick</code> but returns <code>nil</code> instead of a default language when pickers cannot get one.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L68">view source</a></div></div><div class="public anchor" id="var-pickers"><h3>pickers</h3><div class="usage"><code>(pickers req)</code></div><div class="doc"><div class="markdown"><p>Returns configured pickers map obtained from a request.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L61">view source</a></div></div><div class="public anchor" id="var-prep-language"><h3>prep-language</h3><div class="usage"><code>(prep-language config)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L369">view source</a></div></div><div class="public anchor" id="var-prep-supported"><h3>prep-supported</h3><div class="usage"><code>(prep-supported v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L360">view source</a></div></div><div class="public anchor" id="var-process-picker"><h3>process-picker</h3><div class="usage"><code>(process-picker config p)</code></div><div class="doc"><div class="markdown"><p>Prepares a single picker. If it is a map, <code>:compile</code> key should be associated with a function which will return a language-picking function. Symbol may be given and it will be resolved. The compiling function should take a single argument which is a middleware configuration. All keys of the map except <code>:handler</code> and <code>:compile</code> will be passed to it.</p>
<p>If <code>:handler</code> is specified in a map, it should be a function or a symbol which resolves to a function.</p>
<p>If the <code>p</code> is not a map, it should be a function.</p>
<p>A function returned by the compiling function, given as <code>:handler</code>, or simply assigned should take one argument, a request map, and return a language identifier as a keyword.</p>
<p>When a language-picking function is created on a basis of a map (specified by <code>:handler</code> or <code>:compile</code>) then it has the responsibility of transforming its result to a keyword and checking if the chosen language identifier belongs to a supported languages expressed in a configuration as a set under the <code>:supported</code> key. Note that picker compiling function will receive configuration under the <code>config</code> key and should generate a function which takes a single argument (request map) whereas handler should take two arguments, the first being a configuration.</p>
<p>When a language-picking function is not a map but a function (or a symbolic, resolvable identifier of a function) then it will be wrapped in another function and its result will be converted to a keyword and tested against existence in the aforementioned set of supported languages.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L297">view source</a></div></div><div class="public anchor" id="var-query-params-picker"><h3>query-params-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L215">view source</a></div></div><div class="public anchor" id="var-query-params-picker-str"><h3>query-params-picker-str</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L219">view source</a></div></div><div class="public anchor" id="var-re-lang"><h3>re-lang</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L24">view source</a></div></div><div class="public anchor" id="var-req-picker"><h3>req-picker</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L173">view source</a></div></div><div class="public anchor" id="var-supported"><h3>supported</h3><div class="usage"><code>(supported req)</code><code>(supported _ config)</code></div><div class="doc"><div class="markdown"><p>Returns a value associated with <code>:supported</code> key in settings obtained from a request map or a config.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L46">view source</a></div></div><div class="public anchor" id="var-wrap-language"><h3>wrap-language</h3><div class="usage"><code>(wrap-language k config)</code></div><div class="doc"><div class="markdown"><p>Language wrapping middleware.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/http/middleware/language.clj#L380">view source</a></div></div></div></body></html>