[Pas2js] Translating using resource strings
Pedro Pablo Oviedo Vera
verakuba13 at gmail.com
Wed Jul 17 20:34:47 CEST 2019
Hello friends, I am new in Pas2js, I want begin to learn about it and
then contribute to the project but I need a starting point, any help
please..
2019-07-15 9:05 GMT-04:00, Michael Van Canneyt <michael at freepascal.org>:
>
> Hello,
>
> I've added a unit that presents you with an API to translate the resource
> strings in your program.
>
> The unit is called rstranslate. You can
>
> 1. Load a translation for a single resource string.
>
> 2. Load an object with a list of units/strings that must be translated in a
> simple format.
>
> 3. Specify an URL of a file which contains the translations.
> The file will be loaded, the object parsed and used to translate using
> mechanism 2.
> Since this is an async operation, there is a callback to notify you when
> the translation is done.
>
> 4. Reset the resource strings to their original values for one string or all
> strings of a unit.
>
> For each of the cases there is a demo in the folder demo/translate.
> You can click the translate button twice : every even click will reset the
> translation, allowing you to switch between 2 languages.
>
> The implementation is just a sample which should cover most use cases.
> You can perfectly create your own alternative mechanism, of course.
>
> Still planned is to let the compiler generate a file (in the same format as
> used by this API) with the default values of the strings as found in the
> program source file(s).
>
> Michael.
> _______________________________________________
> Pas2js maillist - Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
>
--
MSc. Ing. Pedro Pablo Oviedo Vera
Dirección Técnica y Desarrollo
Empresa de Proyectos e Ingeniería del
Ministerio de la Agricultura.ENPA.
Boyeros y Conill, Piso 10 Edif MINAG
Telef. 884 7197
SIP:23000116
More information about the Pas2js
mailing list