{"id":22045214,"url":"https://github.com/nigelhorne/lingua-string","last_synced_at":"2025-05-08T07:48:29.324Z","repository":{"id":56837287,"uuid":"332059811","full_name":"nigelhorne/Lingua-String","owner":"nigelhorne","description":"Class to contain a string in many different languages","archived":false,"fork":false,"pushed_at":"2025-03-04T00:59:21.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T07:48:22.989Z","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}},"created_at":"2021-01-22T20:51:45.000Z","updated_at":"2025-03-04T00:59:24.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-String","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":"0.29729729729729726","last_synced_commit":"e54627e5540e96f0f7f4b464cbdeeabe7f626eea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-String","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-String/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-String/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FLingua-String/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/Lingua-String/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025334,"owners_count":21842409,"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","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":"2024-11-30T13:12:17.392Z","updated_at":"2025-05-08T07:48:29.317Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","readme":"# NAME\n\nLingua::String - Class to contain a string in many different languages\n\n# VERSION\n\nVersion 0.06\n\n# SYNOPSIS\n\nHold many strings in one object,\nthereby encapsulating internationalized text.\n\n    use Lingua::String;\n\n    my $str = Lingua::String-\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 $string = Lingua::String-\u003enew('hello');  # Initialises the 'current' language\n\n# METHODS\n\n## new\n\nCreate a Lingua::String object.\n\n    use Lingua::String;\n\n    my $str = Lingua::String-\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 string in a language.\n\n    $str-\u003eset({ string =\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 string in the language requested in the parameter.\nIf that parameter is not given, the system language is used.\n\n    my $string = Lingua::String-\u003enew(en =\u003e 'boat', fr =\u003e 'bateau');\n    print $string-\u003eas_string(), \"\\n\";\n    print $string-\u003eas_string('fr'), \"\\n\";\n    print $string-\u003eas_string({ lang =\u003e 'en' }), \"\\n\";\n\n## encode\n\nTurns the encapsulated strings into HTML entities\n\n    my $string = Lingua::String-\u003enew(en =\u003e 'study', fr =\u003e 'étude')-\u003eencode();\n    print $string-\u003efr(), \"\\n\";  # Prints \u0026eacute;tude\n\n# AUTHOR\n\nNigel Horne, `\u003cnjh at bandsman.co.uk\u003e`\n\n# BUGS\n\nThere's no decode() (yet) so you'll have to be extra careful to avoid\ndouble encoding.\n\n# SEE ALSO\n\n# SUPPORT\n\nYou can find documentation for this module with the perldoc command.\n\n    perldoc Lingua::String\n\nYou can also look for information at:\n\n- MetaCPAN\n\n    [https://metacpan.org/release/Lingua-String](https://metacpan.org/release/Lingua-String)\n\n- RT: CPAN's request tracker\n\n    [https://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-String](https://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-String)\n\n- CPANTS\n\n    [http://cpants.cpanauthors.org/dist/Lingua-String](http://cpants.cpanauthors.org/dist/Lingua-String)\n\n- CPAN Testers' Matrix\n\n    [http://matrix.cpantesters.org/?dist=Lingua-String](http://matrix.cpantesters.org/?dist=Lingua-String)\n\n- CPAN Testers Dependencies\n\n    [http://deps.cpantesters.org/?module=Lingua-String](http://deps.cpantesters.org/?module=Lingua-String)\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Flingua-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Flingua-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Flingua-string/lists"}