| View previous topic :: View next topic |
| Author |
Message |
Kisiel
Joined: 05 May 2008 Posts: 2
|
Posted: Mon May 05, 2008 1:22 pm Post subject: New Option/Plugin Request - Diacritic Letters |
|
|
Hi, everone! Before using AkelPad i tried many other standard windows notepad replacements.
Metapad, LitePad, Notepad2, Notepad++, FastPad - all those are better than standard windows notepad but AkelPad
linking the best functions from them to one useful program. However few great functions still aren't
added. So I'm begging for new option/plugin:
"Change Diacritic Letters"
example:
*Polish (in php code):
<?
function convert_polish_letters($str){
$trans = array(
"Ą" => "A",
"ą" => "a",
"Ć" => "C",
"ć" => "c",
"Ę" => "E",
"ę" => "e",
"Ł" => "L",
"ł" => "l",
"Ń" => "N",
"ń" => "n",
"Ó" => "O",
"ó" => "o",
"Ś" => "S",
"ś" => "s",
"Ź" => "Z",
"ź" => "z",
"Ż" => "Z",
"ż" => "z",
);
return strtr($str, $trans);
}
?>
---
I think it can be great option for diffrent language too.
Czech: á, é, í, ó, ú, ý, č, ď, ě, ň, ř, š, ť, ž, ů
Livonian: ā, ä, ǟ, ḑ, ē, ī, ļ, ņ, ō, ȯ, ȱ, õ, ȭ, ŗ, š, ț, ū, ž.
Latvian: ā, ē, ī, ū, ŗ, ļ, ķ, ņ, ģ, š, ž, č
and many others
for full diacritic letters go to:
http://en.wikipedia.org/wiki/Diacritic
Thanks for great program and sorry for my bad english  |
|
| Back to top |
|
 |
Infocatcher
Joined: 06 Aug 2007 Posts: 1433
|
Posted: Mon May 05, 2008 5:19 pm Post subject: |
|
|
Kisiel, try Scripts plugin and following script:
| Code: | var map = {
"\u0104": "A",
"\u0105": "a",
"\u0106": "C",
"\u0107": "c",
"\u0118": "E",
"\u0119": "e",
"\u0141": "L",
"\u0142": "l",
"\u0143": "N",
"\u0144": "n",
"\u00D3": "O",
"\u00F3": "o",
"\u015A": "S",
"\u015B": "s",
"\u0179": "Z",
"\u017A": "z",
"\u017B": "Z",
"\u017C": "z"
};
function replaceLetters(str) {
for(var s in map)
str = str.replace(new RegExp(s, "g"), map[s]);
return str;
}
var AkelPad = new ActiveXObject("AkelPad.document");
AkelPad.ReplaceSel(
replaceLetters(AkelPad.GetSelText())
); |
For get "\u0104" I use JavaScript method escape:
| Code: | | javascript: void(prompt('', escape('Ą'))); |
(copy this line in address bar of browser and press <enter>. JS in address bar not works in IE...)
Or you can use AkelPad for this:
| Code: | var AkelPad = new ActiveXObject("AkelPad.document");
AkelPad.ReplaceSel(
escape(AkelPad.GetSelText())
); |
|
|
| Back to top |
|
 |
Kisiel
Joined: 05 May 2008 Posts: 2
|
Posted: Mon May 05, 2008 6:11 pm Post subject: |
|
|
I already tryed to use 'Scripts plugin'
but whatever i try i get error occurted and akelpad close
I just reinstalled it to newest version with plugins but nothing changed.
First i think i deactivated vbs&js scripting in windows - thats not it.
Its strange because now i can't use any scrpit in akelpad. |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4650
|
Posted: Tue May 06, 2008 3:38 am Post subject: |
|
|
Kisiel
Check that Scripts plugin version is 3.2. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|