Get local's URL for index page I have two menus.
One with countries, one with navigation.

Navigation menu must to have a index link of a active locale. 
So if I'm at example.com/uk/section and I go to navigation menu and click at index link, I get index of /uk

My countries menu code is:

{% set locales = ['en', 'en_gb', 'sk'] %}
    {# Check if locale equals the requested page locale #}
    {% if locale == craft.locale %}
        {% set current = true %}
    {% else %}
        {% set current = false %}
    {% endif %}
    {% set locale = craft.i18n.getCurrentLocale() %}
      {% for locale in locales %}
         &lt;li&gt;
           &lt;a href="{{ craft.config.siteUrl[locale] ~ craft.request.getPath() }}" class="{{ current ? 'uk-active'}}"&gt;{{ craft.i18n.getLocaleById(locale).name }}&lt;/a&gt;&lt;/li&gt;     


When I try to copy 

&lt;a href="{{ craft.config.siteUrl[locale] ~ craft.request.getPath() }}" 
class="{{ current ? 'uk-active'}}"&gt;{{ craft.i18n.getLocaleById(locale).name }}&lt;/a&gt;


and put it to my navigation menu I get 

Internal Server Error    array_key_exists(): The first argument should be either a string or an integer


Is it fixable or any other way around?
I probably don't fully understand what you're trying to acchieve, but to get to the index page of your current locale, you'd simply use siteUrl().