{"id":18406419,"url":"https://github.com/defuncart/flutter_pseudolocalizor","last_synced_at":"2026-03-05T16:39:18.657Z","repository":{"id":48470365,"uuid":"227150667","full_name":"defuncart/flutter_pseudolocalizor","owner":"defuncart","description":"A Pseudolocalization tool for Flutter and Dart which generates pseudo, nonsensical translations for multiple languages from a given English source.","archived":false,"fork":false,"pushed_at":"2024-02-16T17:35:35.000Z","size":93,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T15:22:58.988Z","etag":null,"topics":["dart","dart-package","flutter","flutter-tool","pseudolocalization"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defuncart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-10T15:12:05.000Z","updated_at":"2024-05-10T21:24:24.000Z","dependencies_parsed_at":"2022-09-05T03:31:02.806Z","dependency_job_id":null,"html_url":"https://github.com/defuncart/flutter_pseudolocalizor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Fflutter_pseudolocalizor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Fflutter_pseudolocalizor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Fflutter_pseudolocalizor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defuncart%2Fflutter_pseudolocalizor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defuncart","download_url":"https://codeload.github.com/defuncart/flutter_pseudolocalizor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247620423,"owners_count":20968208,"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":["dart","dart-package","flutter","flutter-tool","pseudolocalization"],"created_at":"2024-11-06T03:09:00.604Z","updated_at":"2026-03-05T16:39:18.640Z","avatar_url":"https://github.com/defuncart.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_pseudolocalizor\n\nA Pseudolocalization tool for Flutter which generates pseudo, nonsensical translations for multiple languages from a given English source.\n\n## Pseudolocalization\n\n- *Internationalization* is the process of designing a software application so that it can easily be adapted to various other languages and regions without any programming changes. \n- *Localization* is the process of adapting internationalized software for a specific region or language by adding locale-specific components (€2.99 =\u003e 2,99€) and translating text (Hello World! =\u003e Hallo Welt!). \n- *Pseudolocalization* is a software testing method used before the localization process in which a fake (or pseudo) translations (with the region and language specific characters) are generated: `Hello World!` =\u003e `[ Hellö Wörld! ÜüäßÖ ]`.\n\nThe benefits of pseudolocalization are three fold:\n\n1. To test that all (special) characters of the target locale (i.e. German) are displayed correctly.\n2. To test that text boxes can accommodate longer translations. If a pseduotranslation is cutoff or visually looks ugly on the screen, then there's a good chance that the real translation will too.\n3. To flag hardcoded strings or text images.\n\n### Character Replacement\n\nGenerally psuedo translations will replace characters in the English string (i.e. `Hello World`) with special (i.e. accented) characters from the target language. Considering German, the special characters `ä ö ü ß Ä Ö Ü ẞ` could be mapped to vowels a, o and u, with ß mapped to b. Although the letter ß has no relationship to b in German, what is important here is that the text is as readable as possible for the developer. The pseudo translation may also use a mixture of all UTF-8 special characters.\n\n### Text Expansion\n\nConsidering English as the base language, after translation many languages will exhibit *text expansion* and have longer text strings. Generally German extends by 10-35%, Polish 20-30% and Russian by 15%. Moreover, shorter English text strings tends to expanded even more than larger strings. Thus one approach to text expansion is to use a constant (say 40%), while another is to use a function of input text length returning values from 30-50%. Note that some languages (i.e. Japanese, Korean) generally contract and can actually have shorter text strings than their English counterparts.\n\n### Text Expansion Format\n\nThere are multiple ways to format the text expansion, for instance:\n\n- appending random special characters: `Hellö Wörld äßÜẞ`.\n- repeating all vowels multiple times: `Heellöö Wöörld`.\n- appending number words: `Hellö Wörld one two`.\n- wrapping the base text with exclamation marks:  `!!! Hellö Wörld !!!`)\n\nMoreover, the text expansion is often wrapped in square brackets to easily determine UI clipping, while it may also use punctuation of the target language (i.e. ¿ and ¡ in Spanish).\n\n### Pseudo Translations\n\nPutting this altogether, the base string can be rendered as follows:\n\n| English | Hello World!           |\n| ------- | ---------------------- |\n| German  | [Hellö Wörld! ÜüäßÖ]   |\n| Polish  | [Hęęęłłóóó Wóórłd!]    |\n| Russian | [!!! Нёлло Шоялд! !!!] |\n| Spanish | [Hélló Wórld! one two] |\n\nIt is important to remember that these pseduotranslations are nonsensical: they are not real translations, instead merely a way to test that the app is ready for the translation stage.\n\n## Getting Started\n\nFirstly, add the package as a dev dependency:\n\n```yaml\ndev_dependencies: \n  flutter_pseudolocalizor: \n```\n\nNext define settings in `pubspec.yaml` for the package:\n\n```yaml\nflutter_pseudolocalizor:\n  input_filepath: \"test.arb\"\n  replace_base: true\n  unicode_blocks:\n    - latinSupplement\n    - latinExtendedA\n  seed: 0\n  use_brackets: true\n  text_expansion_format: 'repeatVowels'\n  text_expansion_ratio: null\n  languages_to_generate:\n    - de\n    - pl\n    - ru\n  patterns_to_ignore:\n    - '%(\\S*?)\\$[ds]'\n    - 'Flutter'\n  keys_to_ignore:\n    - 'title'\n  arb_settings:\n    output_directory: 'l10n_pseudo'\n  csv_settings:\n    output_filepath: 'test_PSEUDO.csv'\n    delimiter: \";\"\n    column_index: 1\n```\n\n| Setting                    | Description                                                                                                             |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| input_filepath             | A path to the input localization file.                                                                                  |\n| replace_base               | Whether the base language (en) should be replaced. Defaults to `false`.                                                 |\n| unicode_blocks             | When replace_base is true, a list of unicode blocks to use. Defaults to all.                                            |\n| seed                       | A seed for random generators. This should ensure that psuedo strings are generated identically each run.                |\n| text_expansion_format      | The format of the text expansion. Defaults to `repeatVowels`, alternatives `append`, `numberWords`, `exclamationMarks`. |\n| text_expansion_ratio       | The ratio (between 1 and 3) of text expansion. If `null`, uses a linear function.                                       |\n| languages_to_generate      | A list of languages to generate. Defaults to empty.                                                                     |\n| patterns_to_ignore         | A list of patterns to ignore during text replacement.                                                                   |\n| keys_to_ignore             | A list of keys which should be ignored.                                                                                 |\n| arb_settings               | Optional settings when the input file is an arb, please see below for more info.                                        |\n| csv_settings               | Optional settings when the input file is a csv file, please see below for more info.                                    |\n\n`input_filepath` must be given, all other settings are optional. \n\n`replace_base` replaces the base language (en) with characters from `unicode_blocks`. To test specific languages, set `languages_to_generate` with a list of languages. `patterns_to_ignore` is especially useful to avoid text replacement for certain know constructs, for instance a product name or a pattern `%myVar$d` used to parse variables from text.\n\n| ARB Setting                | Description                                                                                                             |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| output_directory           | An optional directory for generated files. Defaults to `l10n_pseudo`.                                                   |\n\n| CSV Setting                | Description                                                                                                             |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| output_filepath            | A path for the generated output file. Defaults to `\u003cinput_filename\u003e_PSEUDO.csv`.                                        |\n| delimiter                  | A delimiter to separate columns in the input CSV file. Defaults to `,`.                                                 |\n| column_index               | The column index of the base language (en) in the input CSV file. Defaults to `1`.                                      |\n\nEnsure that your current working directory is the project root, then run the terminal command:\n\n```sh\ndart run flutter_pseudolocalizor\n```\n\nor\n\n```sh\nflutter pub run flutter_pseudolocalizor\n```\n\nto generate output files.\n\n## Future Plans\n\n- Presently 500 non-basic latin characters are available. \n  - IPA Extensions, Phonetic Extensions, Latin Extended Additional, Latin Extended Additional, Letterlike symbols will be considered in future versions.\n- Although 8 languages are currently supported, some of the world's most spoken languages like Arabic, Chinese and Hindi are not supported. \n  - For languages with their own alphabets (like Arabic, Armenian, Georgian, Hindi, Korean etc.), one approach could be to append random letters from the alphabet onto the original English text.\n  - For character based writing systems like Chinese, Japanese etc., maybe random characters could be appended to the original English text.\n- If the Russian mapping is positively received, other languages which use the Cyrillic alphabet and Greek could be similarly implemented.\n- Migrate to use Characters class over Strings.\n\n## Collaboration\n\nSpotted any issues? Please open [an issue on GitHub](https://github.com/defuncart/flutter_pseudolocalizor/issues)! Would like to contribute a new language or feature? Fork the repo and submit a PR!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuncart%2Fflutter_pseudolocalizor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefuncart%2Fflutter_pseudolocalizor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefuncart%2Fflutter_pseudolocalizor/lists"}