import { Locales } from './models' ; export const getString = ( locales , locale , stringID ) : string => { let l = stringID . split ( '.' ) . reduce ( ( o , i ) => o [ i ] , locales [ locale ] ) ; if ( l instanceof Array ) l = l [ Math . floor ( Math . random ( ) * l . length ) ] ; return String ( l ) ; } ;