October 27, 200916 yr Hi, What would be the best practice to develop multilingual script? Some script have string variables and I would like to make the solution multilingual. I though about a "getText (stringID, langCode)" custom function that would fetch the string from a global variable, but I'm not sure about this practice. Otherwise, I don't think creating a script to fetch the data is best method. Example Set Variable [$title; getText (4; "EN")]; Set Variable [$msg; getText (1; "EN")]; Show custom dialog [$title; $msg]; Thanks for help
October 27, 200916 yr If you had a string table that you could load in to an array of global variables on startup via a looping script, or a single script step. $$strings[1], $$strings[2], $$strings[3] the first could be a return sep list of english and the second be Spanish, etc. This way you could modify them and not have to change the CF should the strings need to be modified. You can use your CF to grab the known value from the appropriate language. getText ( 4 ; 2 ) GetValue ( $$strings[ 2 ] ; 4 )
October 27, 200916 yr Author I was thinking more of reloading the global list via a script if the user interface changed value. I think there's no more need to set the language in the fetch function. Since the global list would be the language the user interface would be. The list could be in this format English Do you really want to delete this record? Create a new record? ... French Désirez-vous vraiment supprimer cet enregistrement? Créer un nouvel enregistrement? ... Spanish Sorry, no habla spanol Their could also be some place holders for some parameters.
October 30, 200916 yr Author What would be the best way to create a catalog for such usage? Creating a distinct field for each message? or Creating a single field with let say a 1000 repetitions? Thanks
December 8, 201312 yr I use this in my app: http://www.modularfilemaker.org/2013/08/labelmaker-pro-enable-multilingual-field-labels-for-your-filemaker-solution/ It is straight forward and easy to use. Best of all, it is 'free'...
Create an account or sign in to comment