{"Entry":{"collection":"func","key":"translate","name":"translate","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"9.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"c19edb8d088dd983c27a16a8864282d432f94713b7266f52699837eaaa39de34","first_version":"7.1","group":"string","group_label":"String Functions And Operators","groups":["string"],"imported_at":"2026-09-27T17:57:28.451811+08:00","last_version":"20","name":"translate","name_key":"translate","position":3053,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"translate ( string text, from text, to text ) → text","signature_count":1,"slug":"translate","source_rev":"b7bd9cda","summary":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set.","summary_zh":""}},"Definition":{"Collection":"func","Key":"translate","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"translate","SourceRevision":"b7bd9cda","Facts":{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"},"group":"string","group_label":"String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"","description_zh_html":"","examples":[{"expr":"translate('12345', '143', 'ax')","result":"a2x5"}],"html":"\u003ccode class=\"function\"\u003etranslate\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"translate","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"translate","Summary":"将string中与from集合中匹配的每个字符替换为to集合中相应的字符。如果from长于to，输入中出现的from中的额外字符会被删除。","BodyHTML":"将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中与\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e集合中匹配的每个字符替换为\u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e集合中相应的字符。如果\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e长于\u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e中的额外字符会被删除。\u003cpre\u003etranslate ( string text, from text, to text ) → text\u003c/pre\u003e将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中与\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e集合中匹配的每个字符替换为\u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e集合中相应的字符。如果\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e长于\u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的\u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e中的额外字符会被删除。","SourceRevision":"ca936764","ContentHash":"6e1f959fe6715a4435d168f44e06d0f5f8ec2dd23ec3d6de1cae3cf77e88aa59","Payload":{"description_zh":"将string中与from集合中匹配的每个字符替换为to集合中相应的字符。如果from长于to，输入中出现的from中的额外字符会被删除。","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中与\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e集合中匹配的每个字符替换为\u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e集合中相应的字符。如果\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e长于\u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e中的额外字符会被删除。","signatures":[{"description_zh":"将string中与from集合中匹配的每个字符替换为to集合中相应的字符。如果from长于to，输入中出现的from中的额外字符会被删除。","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中与\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e集合中匹配的每个字符替换为\u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e集合中相应的字符。如果\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e长于\u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的\u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e中的额外字符会被删除。","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"95754c3a2c42d0f35c30db627cc9117c1227d4b90e9555e269b38b9218671021","Text":"translate ( string text, from text, to text ) → text","Returns":"text","Payload":{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"","description_zh_html":"","examples":[{"expr":"translate('12345', '143', 'ax')","result":"a2x5"}],"html":"\u003ccode class=\"function\"\u003etranslate\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
