AEM: getting current locale from $PATH
<p>I am reading values for dropdown using selector + request parameters. </p>

<pre><code>/bin/services/myservlet.GET_DROPDOWN_VALUES.json?locale=$PATH
</code></pre>

<p>the <code>$PATH</code> gives me <code>currentPath.path</code>. I can I get the current locale using the path.</p>

<p>for example:</p>

<pre><code>/bin/services/myservlet.GET_DROPDOWN_VALUES.json?locale=en-us
</code></pre>

<p>How can I return only the locale from the $PATH and pass it to locale. That will resolve the issue.</p>