The Frobenius problem for homomorphic embeddings of languages into the integers