Did I find the right examples for you? yes no

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)
Gets list of language codes for registered language packs.

:return list:

        def get_available_language_codes():
    """
    Gets list of language codes for registered language packs.

    :return list:
    """
    ensure_autodiscover()

    return [k for k, v in registry._registry.items()]
        


src/t/r/transliterate-HEAD/example/example/foo/samples.py   transliterate(Download)
# -*- coding: utf-8 -*-
 
from transliterate.discover import autodiscover
from transliterate.conf import set_setting
from transliterate import get_available_language_codes, translit
 
print '\nList of available (registered) languages\n---------------------------------------'
print get_available_language_codes()
 
print '\nReversed transliteration from Armenian\n---------------------------------------'
 
print '\nList of available (registered) languages after registering a new language pack \n---------------------------------------'
print get_available_language_codes()
 
print '\nTransliteration to Example\n---------------------------------------'

src/t/r/transliterate-HEAD/src/transliterate/test.py   transliterate(Download)
from transliterate import defaults
#from transliterate.utils import get_available_language_codes, translit, detect_language, slugify
from transliterate import get_available_language_codes, translit, detect_language, slugify
#from transliterate.utils import get_available_language_packs
from transliterate import get_available_language_packs
    def test_01_get_available_language_codes(self):
        """
        Test ``autodiscover`` and ``get_available_language_codes``.
        """
        res = get_available_language_codes()
        registry.register(ExampleLanguagePack)
 
        assert 'example' in get_available_language_codes()
        res = translit(self.latin_text, 'example')
        self.assertEqual(res, 'Lor5m 9psum 4olor s9t 1m5t')

src/t/r/transliterate-1.6/src/transliterate/test.py   transliterate(Download)
from transliterate import defaults
#from transliterate.utils import get_available_language_codes, translit, detect_language, slugify
from transliterate import get_available_language_codes, translit, detect_language, slugify
#from transliterate.utils import get_available_language_packs
from transliterate import get_available_language_packs
    def test_01_get_available_language_codes(self):
        """
        Test ``autodiscover`` and ``get_available_language_codes``.
        """
        res = get_available_language_codes()
        registry.register(ExampleLanguagePack)
 
        assert 'example' in get_available_language_codes()
        res = translit(self.latin_text, 'example')
        self.assertEqual(res, 'Lor5m 9psum 4olor s9t 1m5t')