{"id":30191608,"url":"https://github.com/nigelhorne/lingua-text","last_synced_at":"2026-06-01T04:31:34.041Z","repository":{"id":56837287,"uuid":"332059811","full_name":"nigelhorne/Lingua-Text","owner":"nigelhorne","description":"Class to contain text in many different languages","archived":false,"fork":false,"pushed_at":"2025-07-20T01:53:52.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-07T19:12:57.509Z","etag":null,"topics":["cpan","perl","perl-module","perl5"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Lingua::String","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-22T20:51:45.000Z","updated_at":"2025-07-20T01:53:55.000Z","dependencies_parsed_at":"2024-03-21T18:42:40.360Z","dependency_job_id":"6ae8d564-78fd-4d74-a54e-d2fb1bbdd1c4","html_url":"https://github.com/nigelhorne/Lingua-Text","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":"0.29729729729729726","last_synced_commit":"e54627e5540e96f0f7f4b464cbdeeabe7f626eea"},"previous_names":["nigelhorne/lingua-text"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nigelhorne/Lingua-Text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-Text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-Text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-Text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-Text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/Lingua-Text/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-Text/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270135057,"owners_count":24533196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpan","perl","perl-module","perl5"],"created_at":"2025-08-12T21:05:49.174Z","updated_at":"2025-12-12T02:41:28.839Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nLingua::Text - Class to contain text in many different languages\n\n# VERSION\n\nVersion 0.07\n\n# SYNOPSIS\n\nHold many texts in one object,\nthereby encapsulating internationalized text.\n\n    use Lingua::Text;\n\n    my $str = Lingua::Text-\u003enew();\n\n    $str-\u003efr('Bonjour Tout le Monde');\n    $str-\u003een('Hello, World');\n\n    $ENV{'LANG'} = 'en_GB';\n    print \"$str\\n\";     # Prints Hello, World\n    $ENV{'LANG'} = 'fr_FR';\n    print \"$str\\n\";     # Prints Bonjour Tout le Monde\n    $ENV{'LANG'} = 'de_DE';\n    print \"$str\\n\";     # Prints nothing\n\n    my $text = Lingua::Text-\u003enew('hello');      # Initialises the 'current' language\n\n# METHODS\n\n## new\n\nCreate a Lingua::Text object.\n\n    use Lingua::Text;\n\n    my $str = Lingua::Text-\u003enew({ 'en' =\u003e 'Here', 'fr' =\u003e 'Ici' });\n\nAccepts various input formats, e.g. HASH or reference to a HASH.\nClones existing objects with or without modifications.\nUses Carp::carp to log warnings for incorrect usage or potential mistakes.\n\n## set\n\nSets a text in a language.\n\n    $str-\u003eset({ text =\u003e 'House', lang =\u003e 'en' });\n\nAutoload will do this for you as\n\n    $str-\u003een('House');\n\n## as\\_string\n\nReturns the text in the language requested in the parameter.\nIf that parameter is not given, the system language is used.\n\n    my $text = Lingua::Text-\u003enew(en =\u003e 'boat', fr =\u003e 'bateau');\n    print $text-\u003eas_string(), \"\\n\";\n    print $text-\u003eas_string('fr'), \"\\n\";\n    print $text-\u003eas_string({ lang =\u003e 'en' }), \"\\n\";\n\n## encode\n\nTurns the encapsulated texts into HTML entities\n\n    my $text = Lingua::Text-\u003enew(en =\u003e 'study', fr =\u003e 'étude')-\u003eencode();\n    print $text-\u003efr(), \"\\n\";    # Prints \u0026eacute;tude\n\n# AUTHOR\n\nNigel Horne, `\u003cnjh at nigelhorne.com\u003e`\n\n# BUGS\n\nThere's no decode() (yet),\nso you'll have to be extra careful to avoid double encoding.\n\n# SEE ALSO\n\n# SUPPORT\n\nThis module is provided as-is without any warranty.\n\nYou can find documentation for this module with the perldoc command.\n\n    perldoc Lingua::Text\n\nYou can also look for information at:\n\n- MetaCPAN\n\n    [https://metacpan.org/release/Lingua-Text](https://metacpan.org/release/Lingua-Text)\n\n- RT: CPAN's request tracker\n\n    [https://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-Text](https://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-Text)\n\n- CPANTS\n\n    [http://cpants.cpanauthors.org/dist/Lingua-Text](http://cpants.cpanauthors.org/dist/Lingua-Text)\n\n- CPAN Testers' Matrix\n\n    [http://matrix.cpantesters.org/?dist=Lingua-Text](http://matrix.cpantesters.org/?dist=Lingua-Text)\n\n- CPAN Testers Dependencies\n\n    [http://deps.cpantesters.org/?module=Lingua-Text](http://deps.cpantesters.org/?module=Lingua-Text)\n\n# LICENCE AND COPYRIGHT\n\nCopyright 2021-2025 Nigel Horne.\n\nThis program is released under the following licence: GPL2 for personal use on\na single computer.\nAll other users (for example, Commercial, Charity, Educational, Government)\nmust apply in writing for a licence for use from Nigel Horne at \\`\u0026lt;njh at nigelhorne.com\u003e\\`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Flingua-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Flingua-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Flingua-text/lists"}