Seite 4 von 6

Re: BP-Neutrino image arabic language

Verfasst: Sa 24. Feb 2018, 23:38
von BPanther
Ahhh... I have found the keyboard... It is hardcoded at neutrino, this file -> https://github.com/Duckbox-Developers/n ... ut.cpp#L44

You need to create a new keyboard block for your language. Here english (renamed to arabic), so you can change this to arabic.
  1. static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
  2. {
  3.     {
  4.         { "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
  5.         { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[",  "]",  "{", "}"  },
  6.         { "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "\'", "\\", ":", "\"" },
  7.         { "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "<",  ">",  "?", " "  }
  8.     },
  9.     {
  10.         { "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_",  "+",  "§", },
  11.         { "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "{",  "}",  "{", "}"  },
  12.         { "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "\'", "\\", ":", "\"" },
  13.         { "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "<",  ">",  "?", " "  }
  14.     }
  15. };
Please change the key fields only, do not add new or remove any fields.

Re: BP-Neutrino image arabic language

Verfasst: So 25. Feb 2018, 21:39
von mohasoli
BPanther hat geschrieben: Sa 24. Feb 2018, 23:38 Ahhh... I have found the keyboard... It is hardcoded at neutrino, this file -> https://github.com/Duckbox-Developers/n ... ut.cpp#L44

You need to create a new keyboard block for your language. Here english (renamed to arabic), so you can change this to arabic.
  1. static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
  2. {
  3.     {
  4.         { "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
  5.         { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[",  "]",  "{", "}"  },
  6.         { "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "\'", "\\", ":", "\"" },
  7.         { "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "<",  ">",  "?", " "  }
  8.     },
  9.     {
  10.         { "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_",  "+",  "§", },
  11.         { "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "{",  "}",  "{", "}"  },
  12.         { "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "\'", "\\", ":", "\"" },
  13.         { "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "<",  ">",  "?", " "  }
  14.     }
  15. };
Please change the key fields only, do not add new or remove any fields.

Code: Alles auswählen

[Cbx=cpp]static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
{
	{
		{ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
		{ "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",  "د",  "{", "}"  },
		{ "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط'", "ذ", ":", "\"" },
		{ "ئ", "ء", "ؤ", "ر", "لا", "ى", "ة", "و", "ز", "ظ", "<",  ">",  "?", " "  }
	};
};[/Cbx]

Re: BP-Neutrino image arabic language

Verfasst: So 25. Feb 2018, 21:53
von mohasoli
mohasoli hat geschrieben: So 25. Feb 2018, 21:39
BPanther hat geschrieben: Sa 24. Feb 2018, 23:38 Ahhh... I have found the keyboard... It is hardcoded at neutrino, this file -> https://github.com/Duckbox-Developers/n ... ut.cpp#L44

You need to create a new keyboard block for your language. Here english (renamed to arabic), so you can change this to arabic.
  1. static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
  2. {
  3.     {
  4.         { "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
  5.         { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[",  "]",  "{", "}"  },
  6.         { "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "\'", "\\", ":", "\"" },
  7.         { "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "<",  ">",  "?", " "  }
  8.     },
  9.     {
  10.         { "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_",  "+",  "§", },
  11.         { "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "{",  "}",  "{", "}"  },
  12.         { "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "\'", "\\", ":", "\"" },
  13.         { "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "<",  ">",  "?", " "  }
  14.     }
  15. };
Please change the key fields only, do not add new or remove any fields.

Code: Alles auswählen

[Cbx=cpp]static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
{
	{
		{ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
		{ "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",  "د",  "{", "}"  },
		{ "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط'", "ذ", ":", "\"" },
		{ "ئ", "ء", "ؤ", "ر", "لا", "ى", "ة", "و", "ز", "ظ", "<",  ">",  "?", " "  }
	};
};[/Cbx]
OK
But where is this code placed?

Re: BP-Neutrino image arabic language

Verfasst: So 25. Feb 2018, 23:23
von BPanther
The keys are placed at neutrino itself - fix, hardcoded.

Here a test picture. Is this right?
arabic_keyboard.png
Has the arabic font no upper and lower case? If not, i must duplicate this, because there are 2 keyboard layouts for upper and lower case used...

BUT: The direction of the input chars are wrong, will be still left to right. Sorry, but this won't work, because all input fields must be rewritten for the "reverse" direction. You should use the english keyboard...

Re: BP-Neutrino image arabic language

Verfasst: Mo 26. Feb 2018, 18:14
von mohasoli
BPanther hat geschrieben: So 25. Feb 2018, 23:23 The keys are placed at neutrino itself - fix, hardcoded.

Here a test picture. Is this right?
arabic_keyboard.png

Has the arabic font no upper and lower case? If not, i must duplicate this, because there are 2 keyboard layouts for upper and lower case used...

BUT: The direction of the input chars are wrong, will be still left to right. Sorry, but this won't work, because all input fields must be rewritten for the "reverse" direction. You should use the english keyboard...
OK
The keyboard is correct
But a simple modification to one letter
Correct code attachment

Code: Alles auswählen

[Cbx=cpp]static std::string keys_arabic[2][KEY_ROWS][KEY_COLUMNS] =
{
	{
		{ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
		{ "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",  "د",  "{", "}"  },
		{ "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط", "ذ", ":", "\"" },
		{ "ئ", "ء", "ؤ", "ر", "لا", "ى", "ة", "و", "ز", "ظ", "<",  ">",  "?", " "  }
	};
	
	{
		{ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-",  "=",  "§"  },
		{ "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",  "د",  "{", "}"  },
		{ "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط", "ذ", ":", "\"" },
		{ "ئ", "ء", "ؤ", "ر", "لا", "ى", "ة", "و", "ز", "ظ", "<",  ">",  "?", " "  }
	};
};[/Cbx]
the arabic font no upper and lower case ' it is one case

Re: BP-Neutrino image arabic language

Verfasst: Mo 26. Feb 2018, 18:18
von mohasoli
But the direction of writing in the Arabic language has to be changed from right to left

Re: BP-Neutrino image arabic-lang.

Verfasst: Mo 26. Feb 2018, 20:09
von mohasoli
DboxOldie hat geschrieben: So 18. Feb 2018, 19:55 Which keyboard files do you mean ??
We want the image to be supported for writing in Arabic
To search on YouTube and the like

Re: BP-Neutrino image arabic language

Verfasst: Mo 26. Feb 2018, 22:05
von BPanther
As I trying to write, this is currently not possible. Nothing in neutrino can switch the direction for the input fields, and I can't do this - sorry. I will check in the keyboard (see picture if correct) to the GIT, but deactivated until a change for the font direction is done.

New picture added...
screenshot_26-02-18.png

Re: BP-Neutrino image arabic language

Verfasst: Mo 26. Feb 2018, 22:21
von thomas
bp sie müssen halt einfach ihr suchbegriff eintippen - egal ob lins rechts - wichtig ist nur der engetippte suchbegriff und youtube es dann findet

Re: BP-Neutrino image arabic language

Verfasst: Mo 26. Feb 2018, 22:27
von BPanther
Naja, ich kann sie da schon verstehen. Wäre ja so, als wenn Du alles rückwärts schreiben müsstest. Nur in Neutrino ist nichts darauf vorbereitet, das geht halt nicht so ohne weiteres. Dazu muß zuviel umgestellt werden und ich wüßte da auch nicht, wie man das realisieren sollte, damit es kompatibel bleibt.

Re: BP-Neutrino image arabic language

Verfasst: Di 27. Feb 2018, 10:12
von mohasoli
BPanther hat geschrieben: Mo 26. Feb 2018, 22:05 As I trying to write, this is currently not possible. Nothing in neutrino can switch the direction for the input fields, and I can't do this - sorry. I will check in the keyboard (see picture if correct) to the GIT, but deactivated until a change for the font direction is done.

New picture added...
screenshot_26-02-18.png
Here is a code to convert the direction of writing by language in PHP

Code: Alles auswählen

if ($lang == "ar")
{
$dir="rtl";
}
elseif($lang == "en")
{
$dir="ltr";
} 

Re: BP-Neutrino image arabic language

Verfasst: Di 27. Feb 2018, 10:17
von mohasoli
BPanther hat geschrieben: Mo 26. Feb 2018, 22:05 As I trying to write, this is currently not possible. Nothing in neutrino can switch the direction for the input fields, and I can't do this - sorry. I will check in the keyboard (see picture if correct) to the GIT, but deactivated until a change for the font direction is done.

New picture added...
screenshot_26-02-18.png
OK
Is it possible to send me the file that is being modified to show the Arabic keyboard to try to reach a solution to the problem
Where I have medium experience in languages PHP and HTML

Re: BP-Neutrino image arabic language

Verfasst: Di 27. Feb 2018, 13:25
von BPanther
The keyboard is at the GIT ( https://github.com/Duckbox-Developers?tab=repositories ), so you can build neutrino and activate this here https://github.com/Duckbox-Developers/n ... ut.cpp#L91 and here https://github.com/Duckbox-Developers/n ... t.cpp#L113 (set #if 0 to #if 1). I know the html or php rtl/ltr function, but not usable at c++. :(

Re: BP-Neutrino image arabic language

Verfasst: Mi 28. Feb 2018, 10:07
von thomas
ist bei mohousch das auch so das er von links nach rechts eingeben muss ?
im nhd2 ist doch vermutlich das drin

Re: BP-Neutrino image arabic language

Verfasst: Mi 28. Feb 2018, 14:14
von TangoCash
Und wenn man die RTL-mark von Hand setzt, also für die einzelnen chars ?
z.B.:

Code: Alles auswählen

"\u200Eخ"