Jump to content

multi-language module


friedemann_bach

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.