friedemann_bach Posted March 18, 2009 Share Posted March 18, 2009 Hello! I am writing a module that creates HTML forms and validates them for me. I want validation messages like "incorrect format" or "please enter a value" to appear automatically in specified language. Now, how do I save all the text snippets in an efficient way? Right now, I have defined all snippets as constants like "TS_INCORRECT_FORMAT" or "TS_NO_VALUE" in a file for each language, and each time the module is loaded, the translation file that corresponds to the user language is loaded. This works, but are there more efficient methods (like saving the snippets in an array)? I fear to get out of constant names ... I am looking forward to your ideas! Link to comment https://forums.phpfreaks.com/topic/149950-multi-language-module/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.