ForumPostAssistant / FPA

The Forum Post Assistant (FPA) script has been developed to assist Joomla!® forum posters to be able to post relevant system, instance, PHP and troubleshooting information directly in to a pre-formatted forum post. This will save a few hours of posting back and forth, asking for, and explaining how to acquire useful information in order for other forum users to help troubleshoot a problem.
https://forumpostassistant.github.io/docs/
GNU General Public License v2.0
25 stars 15 forks source link

Multilanguage #8

Closed elkuku closed 12 years ago

elkuku commented 12 years ago

Hello, I was recently playing with a script that creates a single, multi language capable, file from a set of PHP files. So I thought that FPA would be a good candidate to test this thing..

How does it work ? It basically scans your PHP code for translatable strings, creates or updates language files, and then builds everything into a single file.

Advantages:

You may have a look at the actual (releasable) "result" after running the script: https://github.com/downloads/elkuku/FPA/fpa.php.tar.gz

This is actually a "work in progress", so it is not meant to be merged "as is"...

I just wanted to know what you think about the idea and if it makes sense to invest more time in "refactoring" FPA ?

PhilD13 commented 12 years ago

At first look I think this is a really good idea, I like it and it deserves further work.

PhilD13 commented 12 years ago

Perhaps there is some way to have a separate option (just below the Run-Time Options when the show FPA option is open) for generating the post in English. This way, we would get the best of both worlds. Non English speaking persons can view the FPA script and results in their language and if desired can they can post the results to a forum (security forum for example) in English or their language to a different forum if that is what is desired. What do you think of this idea?

elkuku commented 12 years ago

Thanks for your comments, very encouraging ;) As for your suggestion: If I get you right you mean to have the contents of the "page" in e.g. finnish, while the post "output" should be in english ? (those tiny red on yellow letters inside the <textarea> that you are meant to post to the forum)

huh - I believe that's not possible, because it would require to load two different languages without overwriting... not even J! is able to do so ;) On the other hand you can just switch the languages while your settings (runtime options, information privacy... will remain). Is that an option ?

I did some structural changes and finally changed all language "defines" to their proper function call - I hope you will accept it, or i will shoot myself :P

I also added a Finnish language file including your existing translations. Are there other translations available ? If you get scared when opening the po language files -- please don't ;) They are not meant to be edited "by hand" - but you can do so of course.. A much better solution would be to create a project on https://www.transifex.net - a lot of J devs do so nowerdays - and let the https://opentranslators.transifex.net do the rest. If you need help on this - please ask ;)

PhilD13 commented 12 years ago

"As for your suggestion: If I get you right you mean to have the contents of the "page" in e.g. finnish, while the post "output" should be in english ? (those tiny red on yellow letters inside the