##stringtype E

OPT MODULE

MODULE 'locale'

OBJECT catstr
  id, str
ENDOBJECT

EXPORT CONST %i=%d

EXPORT PROC get_str(cat, id)
  DEF str=NIL, block:PTR TO catstr

  block := [
    %d, %s,
    NIL, NIL
  ]

  WHILE block.str
    IF block.id = id THEN str := block.str
    EXIT block.id++ = id
  ENDWHILE
ENDPROC IF localebase THEN GetCatalogStr(cat, id, str) ELSE str
