Source language: Translate to:

Localization of plugins

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Localization of plugins

Postby anton » Thu Jan 07, 2016 10:51 pm

Good afternoon. Please tell me whether it is possible to localize the description of the commands in the plug-ins?
User avatar
anton
 
Posts: 60
Joined: Fri Oct 19, 2012 9:21 pm

Re: Localization of plugins

Postby HPW » Thu Jan 07, 2016 11:06 pm

Hello,

Seems not, I see no options for that in current plugin-Generator.
But maybe there is a similar conzept like in NeoAppBuilder with a language-file. If present it is used instead of org. definitions.
Just a guess. Dave will tell us.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Localization of plugins

Postby mishem » Fri Jan 08, 2016 12:11 am

Локализация PlugInGenerator, или описание команд готовых плагинов?

Если команд плагинов, то открывай в PlugInGenerator и переводи. :)

Если нужна локализация PlugInGenerator, то могу скинуть перевод, но думаю пока рано его выкладывать. Да и переводить пока в принципе там нечего.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: Localization of plugins

Postby anton » Fri Jan 08, 2016 12:31 am

mishem wrote:Локализация PlugInGenerator, или описание команд готовых плагинов?
Если команд плагинов, то открывай в PlugInGenerator и переводи. :)

Так PlugInGenerator не открывает по моему скомпилированные плагины... Он же с исходниками только работает. Свои плагины я понятно без проблем зарусю... вернее изначально русскими будут.
А вот с скомпиленными беда, мне пока не удалось нечем достучаться до них.
Если нужна локализация PlugInGenerator, то могу скинуть перевод, но думаю пока рано его выкладывать. Да и переводить пока в принципе там нечего.

Да не то чтобы нужна, там и так все понятно... но наверно на сайте стоит обновить русик, лишнем не будет. :)
Seems not, I see no options for that in current plugin-Generator.
But maybe there is a similar conzept like in NeoAppBuilder with a language-file. If present it is used instead of org. definitions.
Just a guess. Dave will tell us.

Thank you. Let's see what Dave says.
User avatar
anton
 
Posts: 60
Joined: Fri Oct 19, 2012 9:21 pm

Re: Localization of plugins

Postby Neosoft Support » Mon Jan 11, 2016 8:28 pm

I hadn't really thought about a method for translating plug-ins. I'd rather not over complicate the plugin generator's interface, but I'm open to suggestions on how multi-lingual plugins might be implemented. (Unfortunately, I don't speak Russian.)
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Localization of plugins

Postby mishem » Tue Jan 12, 2016 11:08 pm

There are two options.
1. The authors lay out the source plug-ins. But I guess not everyone would agree.
2. pull out of the plug-string resources. However, this option can be complicated.

Well We must translate not only hints and description, for example in:

Code: Select all
function dtDayNumToName( num ) {
  var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
  return days[num];
}


We need to translate this array.

"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"

Or make unpacking \ packer plugin.

(Unfortunately, I don't speak Russian.)

I thought that PlugInGenerator can do the translation.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: Localization of plugins

Postby luishp » Wed Jan 13, 2016 1:58 am

Code: Select all
function dtDayNumToName( num,lang) {
  if(lang=="en" || lang==""){
     var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
  }else if(lang=="es"){
     var days = ["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"];
  }else{
     console.log("dtDayNumToName Error: Unsupported language");
  }
     return days[num];
}
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com
User avatar
luishp
 
Posts: 359
Joined: Wed May 23, 2007 10:17 am
Location: Spain

Re: Localization of plugins

Postby mishem » Wed Jan 13, 2016 2:20 am

As the source code to make it clear. We are talking about the compiled plugin.
In general, I think that needs unpacking. Over time, the plug-ins will be many, and from unknown authors. What happens inside is not known. But the responsibility falls to the developer program.
With extractor, you can always see what is added to the program.
In interenete quite ready functions. So I do not think that someone will be engaged in theft and copyright assignment itself.

Как в исходном коде сделать, это понятно. Мы говорим о скомпилированном плагине.
Вообще я думаю что нужен распаковщик. Со временем плагинов появится много, и от не известных авторов. Что будет внутри, не известно. А ответственность будет ложится на разработчика программы.
Имея распаковщик, можно всегда посмотреть что именно добавляется в программу.
В интеренете достаточно готовых функций. Так что я не думаю что кто то будет заниматься воровством и присваиванием себе авторских прав.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: Localization of plugins

Postby HPW » Wed Jan 13, 2016 4:38 am

After a look at the neoAppBuilder language files I would think about an option modelled with this in mind:

The Plugin directory gets a subfolder \language like in neoappbuilder
The format of the language files are the same as in neoappbuilder.
Filenames also English.lang, German.lang , Russian.lang etc.

Code: Select all
TargetApplication=DateTime Plugin
Author=NeoSoft Corp.
SourceLANGID=1033
LANGID=1031
Generator=NeoAppBuilder Language Editor v15.12.19
LastModified=12/24/2015 3:44:03 PM

[About]
00000001=Über
...


In Plugingenerator a plugin Author can write all Descriptions-fields either in clear native language or he can use a placeholder string with resource-id like:

Native insert string:
Code: Select all
Über


Resource-id as insert string
Code: Select all
[About]00000001


When a placeholder is used a second field could display the string fould in the language file.

When the plugingenerator compiles such plugin all language files gets compiled into the plugin.
Then a user of a plugin choose his interface language in neoAppBuilder and this is used to read the description from the internal language-ini.

The language editor should be able to read/write any language file (not only for neoAppbuilder).
This way an plugin-author can provide support for different languages.
He could send his native language file to a user interested in a translation and the user translate it and send it back to compile.
For translations in code I like Luish suggestion. We would need access to the global language variable of neoAppBuilder.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to General NeoAppBuilder Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron