tabularelf/lexicon

3.0.0 Function to get the current lenguage index

Totobal5 opened this issue · 0 comments

Hi i am currently trying to get the index of the current lenguage in the lexicon array, there are no function in the library that can do this but i ready to some litle implementation using an repeat loop.

function lexicon_lenguage_get_index()
{
     var _array =    lexicon_languages_get_array();
     var _current = lexicon_language_get();
     var i=0; repeat(array_length(_array ) )
     {
        var _len = _array [i];
        
        if (_current == _len) 
        {
            return i;
        }
        
        i++;
     }
}

please consider adding this litle function :D