Hi sini-Kit

The permalink mechanism currently relies on being able to bidirectionally
transform tiddler titles into URL fragments and back again, without loss of
information. The trouble with transliteration is that you can't reliably
derive the desired tiddler title from the transliterated permalink.

I think the best approach to fix this would be to add support for "slug"
fields that contain a transliterated title string for use in URLs. For your
example, the tiddler "Сегодня в продаже" would have its slug field set to
"Segodnia_v_prodaje".

Best wishes

Jeremy



On Tue, Feb 24, 2015 at 9:33 AM, sini-Kit <[email protected]> wrote:

>
> I have found this js for translit
>>
>
>     <script>
> function toTranslit(text) {
>     return text.replace(/([а-яё])|([\s_-])|([^a-z\d])/gi,
>     function (all, ch, space, words, i) {
>         if (space || words) {
>             return space ? '-' : '';
>         }
>         var code = ch.charCodeAt(0),
>             index = code == 1025 || code == 1105 ? 0 :
>                 code > 1071 ? code - 1071 : code - 1039,
>             t = ['yo', 'a', 'b', 'v', 'g', 'd', 'e', 'zh',
>                 'z', 'i', 'y', 'k', 'l', 'm', 'n', 'o', 'p',
>                 'r', 's', 't', 'u', 'f', 'h', 'c', 'ch', 'sh',
>                 'shch', '', 'y', '', 'e', 'yu', 'ya'
>             ];
>         return t[index];
>     });
> }
>
> alert(toTranslit("Сегодня в продаже"));
>     </script>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to